Experimental: rewrite the main loop with a constant timestep (fix #351).

This should fix all different behaviors that we observed on slow
machines. These bugs were caused by the undeterministic timestep.

Now, on slow machines, the game will run slower, but the update()
calls will do exactly the same work.