US Secretary of State John Kerry says the world is “on a course leading to tragedy”, as long-running issues threaten a deal between countries at UN climate talks in Lima.