Implemented a spectator mode for CTF

Implemented a spectator mode for CTF and handled players joining and
leaving the game correctly.