A small wrapper around requestAnimationFrame that adds a frame rate constraint.