The deal lets the United States build two new military bases on the Arctic island and stays in force even if Greenland becomes independent.