Minor cleanup to requestAnimationFrame while additionally adding support for immidiate callback.