Improvements and refactoring

- Introduced PrefixMap. Use it in the following situations:
 - pan mode
 - game mode (formerly --ai, now --game-mode)
- New game mode: benchmark. Run a game with one neural network over and over a given number of times.
- Bugfix for track creation
- Other minor refactoring