BERLIN—A lone gunman opened fire during a lecture at Heidelberg University in southwestern Germany on Monday and wounded four people, some of them seriously, police said. Police said that the perpetrator was dead, but didn’t give details of how that happened. They had earlier asked people on Twitter to avoid the Neuenheimer Feld area, home…