The US president defends abandoning the Iran nuclear deal in a wide-ranging speech to the UN.