Stop the rAF clock when there's no running animations.

Restart it when appropriate.
nit:
```
if (ticking && !TESTING)
  requestAnimationFrame(tick);
```