A train controller has been sentenced to three and a half years in jail for his role in a rail disaster in Germany that killed 12 people and left 89 injured.