President Trump has said the US has entered into a deal with Denmark that gives the US "permanent control over security" in Greenland.