Support for external hash change in page engine

When navigation is set to `hash` in the site configuration, it is now possible to change the hash manually without compromising the back/forward navigation.
Before this commit, after manually changing the hash and then navigating away to another page, it was impossible to correctly go back because the manually added hash was not correctly mapped to a page.