Load end-game dialog only after game ends, not already when it starts

This is to ensure that statistics reflect the state at the end of the
game, not that from the start of the game.

Fixes #6547.
Cache chat conversations in the lobby and in-game

This preserves the chat content from the lobby and makes it available
in-game, and also makes all chat content available to the end-game
dialog.
Merge pull request #6555 from obrakmann/fix6547_global_chat

Add a chat cache