Prevent rendering unnecessary pages when the HOME/END keys are pressed

Currently (at least in Firefox) when the HOME/END keys are pressed, this will trigger unnecessary rendering of pages that lay between the current page and the first/last page. Avoid this by going straight to the first/last page instead.
Merge pull request #4941 from Snuffleupagus/avoid-rendering-pages-when-home/end-keys

Prevent rendering unnecessary pages when the HOME/END keys are pressed