The Prince of Wales will attend next year's COP climate conference in Brazil, it has been confirmed, as he pushes to "use his platform to spread urgent optimism" around the environmental debate.