Gunman who killed 2 former colleagues had long history of erratic workplace behavior