update docco and slightly improved detection of requestAnimationFrame/setImmediate