The attack in the city of Graz was among Europe’s worst school shootings in years. The police said the gunman also died, in an apparent suicide.