Add ability to replace hash without interrupting back button

Leverages `history.replaceState` to avoid interrupting user browsing history, without losing the ability to save state in url.