Climate change will fuel acts of terrorism and strengthen recruiting efforts by terrorist groups such as Islamic State and Boko Haram, a report commissioned by the German foreign office has found.