Trump and leaders of Greenland and Denmark have signed a deal allowing an expanded US military presence in Greenland.