President Donald Trump castigated the United Nations as a feckless institution in a speech to the world body on Tuesday, praising the turn America has taken under his leadership.