The UN summit on Climate change has wrapped up with a landmark deal on funding to help vulnerable countries cope with devastating climate impacts but also anger over a failure.