Keep the current vertical position when zooming the document

This PR prevents the document from scrolling to the top of the current page when the zoom level is changed.

In my testing, this seems to work perfectly fine when just zooming the document. Usually the document maintains the exact vertical scroll position. Occasionally, because of rounding issues, the scroll position (the `scrollTop` parameter for the page) might change from `x -> (x + 1)` when zooming, but that is acceptable at least to me.

However, if you very rapidly resize the window the exact position will sometimes be slightly changed because of frequent re-zooming. I do not believe that this a serious issue though, since this is probably a fairly uncommon use case and with this PR it's also a lot better than the current behaviour.

Fixes #1521.

__Edit:__ This PR does not fix issues regarding zooming using `Ctrl+Mouse wheel` in Firefox, since that is addressed in #3421.