Hopes for an agreement on tackling climate change collapsed after a row about mentioning fossil fuels