Improve handling of the before/afterScroll events

Make the beforeScroll function take two arguments: the currently active
page, and the new page to be displayed. As well, if beforeScroll returns
false, the entire operation is aborted.

The afterScroll function now takes two arguments as well: the new page
and the previous page that was scrolled from.

See README.md for more details.