Command Dictionary and shutdown upgrades

Server now quits only when all games and connections are closed. Server
only accepts commands in keychain. Connection is only considered closed
when the loop has actually exited.