A gunman in Germany who shot dead seven people, including an unborn child, before killing himself at a Jehovah’s Witness worship hall in the city of Hamburg was known to authorities, police say.