EU leaders pull all-nighter discussing climate change as Brexit forgottenDeal on greenhouse gas prioritised over EU-UK talks