A gunman with suspected far-right links shot dead nine people, some of them migrants from Turkey, in an overnight rampage through a German city before killing himself.