The UN has adopted a Pact for the Future - a landmark agreement mapping out a better path forward for humanity in the face of wars, poverty and climate change.