Simplify getVisiblePages() in presentation mode

This PR removes the presentation mode specific code from `getVisiblePages()`, since it isn't actually needed any more. (It appears that this code was made redundant by #2916, but I apparently missed it in that PR.)

These change are necessary for an upcoming patch that fixes searching in presentation mode in Firefox.

(Split of from #3593.)