Initialize scroller to first scrollable element.

See #1358.
Initialize scroller to *largest* visible scrollable element.
Delay initialization of activeElement.

We could incorrectly initialize activeElement to document.body if the
scroller is called too early; so delay initialization.  It's safe to
leave activeElement as null.
Also test negative direction when initializing scroller.

The right scrollable element to choose may be scrolled to the bottom, so
we won't find it if we only test scrolling down.  We need to test
scrolling up as well.
Merge branch 'fix-scrolling-on-non-scrollable-documents' into post-1.46

Rationale:
- The cases it fixes are quite common.
- The cases in which it might choose the wrong element to scroll seem to be quite obscure.
- If the wrong element is chosen, the situation is no worse than that of the common cases we're fixing.
- We'll never find problems with it unless people are using it on a day-to-day basis.