Prevent jumps to last page when autoscrolling

It can happen during autoscrolling that current page is set to the last one
when you are moving towards beginning of the document and crosses toolbar
above the document.
This happens due to filling of unsigned integer "scroll_info.last_y"
with negative value.

https://bugzilla.gnome.org/show_bug.cgi?id=725389