Replace use of time.Sleep with requestAnimationFrame.

Callbacks from JavaScript cannot be blocking.
Thanks @slimsag for the hint in
https://github.com/azul3d/gfx/issues/40#issuecomment-68142127!