The UN General Assembly voted overwhelmingly to endorse a landmark International Court of Justice opinion saying nations have a legal duty to fight climate change.