Refactor Game Server: Per-Game MVar
Refactor Game Server: Per-Game MVar

There is really no point in lookup up the game id in the hash map on
every event. Instead, have a hash map of `MVar Game`, and all the
game-handling code only needs to have access to the `MVar Game`.

Hashmap lookups now only happen once when creating a new game, once when
joining, and once when the last player dropped.

Also, `broadcast` is now more thread safe: It sends messages while the
game is taking; this way, even if two threads try to broadcast
something, it arrives in the same order. (One might want to use a
separate `MVar ()` mutex inside the game to not block receiving
messages, not sure about that).

Another nice example of type-driven refactoring :-)

alphalambda/codeworld,google/codeworld,nomeata/codeworld,nomeata/codeworld,pranjaltale16/codeworld,three/codeworld,three/codeworld,tgdavies/codeworld,google/codeworld,venkat24/codeworld,nomeata/codeworld,parvmor/codeworld,three/codeworld,pranjaltale16/codeworld,pranjaltale16/codeworld,alphalambda/codeworld,venkat24/codeworld,venkat24/codeworld,parvmor/codeworld,tgdavies/codeworld,parvmor/codeworld,google/codeworld,tgdavies/codeworld,alphalambda/codeworld