Refactor Presentation Mode code

This PR is the second part in a series of patches that will improve the presentation mode implementation.
This PR refactors the code, and makes a couple of changes. Noteworthy changes made in this PR:
* Create a `isFullscreen` function to check if the browser is in fullscreen mode, instead of duplication the same exact code in multiple places.

* Add/remove the `mousemove` and `mousedown` event listeners when entering/exiting presentation mode, since they are not used when the viewer is used normally.

* Two small tweaks of the `mousedown` event handling function.
 - Removing the regular expression, since it has been unnecessary ever since PR #2919 landed.
 - Make it possible to go back one page by using `Shift` + `Click`.
 
* Keep a reference to the `#viewerContainer`, instead of creating a lot of temporary `wrapper` variables.