Hamas has applauded US President Donald Trump's apparent U-turn from his plan to permanently relocate nearly two million Palestinians from Gaza.