[templates] Rename 'grid' to 'base'
[templates] Fetch websocket hostname dynamically
[templates] Move graphical grid code to 'base'
[templates] Move message-related code to 'base'
[game-api] Move common options to Game class, etc

  * Also updates the logic in webserver.py a bit to reflect the above change.
  * Also replaces the 'title' block in the 'base' template with a template
    variable interpolation.  This removes some redundancy between game
    templates as well, and due to the updated logic it doesn't cause any
    issues if a game doesn't define its own title.