US President Donald Trump said he spoke to the king of Jordan about potentially building housing and moving more than 1 million Palestinians from Gaza to neighbouring countries.