Rewrite as global minor mode

In the process of converting this to a minor mode, I accidentally
complete rewrite :/ I simplified the logic by unifying the scroll-up and
scroll-down functions into just one function called "do-auto-scroll". I
eliminated the dependency on "window-end", which can sometimes be nil,
so there is no longer a need to set "redisplay-dont-pause" to t. When
enabled and disabled, the mode saves and restores the value of
"scroll-margin", so after disabling it, scroll behavior should be fully
restored to what it was.