Introduce requestAnimationFrame to the game loop

This allows the host browser to do some optimizations. In practice,
it raised the average refresh rate with about 10 FPS when jiggling
the background map in the Ripple emulator (Chrome extension).