Improve the game loop

It can now skip frames. Replays are a *lot faster* on the "max speed" setting.
It is for visually grouping all the logic-related actions together. I can remove it if you want.