We only checked if the paintable box had scrollable overflow, but that
was too simple - we now use the same logic that checks whether a box can
be scrolled by a mousewheel event.
The autoscrolling test was updated as well to use rAF+rAF+timeout
instead of a fixed 1000ms timeout, which is prone to flakiness.
When the mouse is dragged from inside a scrollable container to outside
of it, we now automatically scroll the container so the selection can be
extended. Scroll speed scales with the distance past the scrollport
edge, capped at a maximum. Edges close to the viewport boundary get a
wider activation zone so the speed ramp works predictably even when the
mouse has limited room to move.
The logic is encapsulated in AutoScrollHandler, which EventHandler
creates lazily on mouse selection start.