Extract doScrollCheck function into a variable

I ship jQuery in a product I work on, and we recently discovered one of the places our product is used runs a JavaScript minification tool that breaks jQuery. It only renames the doScrollCheck call site, not the function declaration.

I do not have control over the minification tool so I was hoping this harmless change can be made in the core code instead.

This commit simply extracts the doScrollCheck function into a variable which allows the minification tool to pick up the function rename correctly.