Add a GameLoop class and a Renderer interface.
Implement the game loop with requestAnimationFrame.