Germany has suffered a series of attacks and plots in recent years, including a fatal attack in July in which a man who pledged allegiance to Islamic State attacked a Pride celebration in Berlin