Recenter handles near top and bottom better.

If the cursor is near the top or near the bottom, it is not possible to
scroll to all three positions.  These are now special cased.