Donald Trump has accused the United Kingdom of “stupidity” over its plan to hand over ownership of the Chagos Islands, including the US air base on Diego Garcia, to Mauritius.