United States President Donald Trump has struck a deal with Denmark to give the US security control over Greenland.