Add pushstate stuff

This fixes the problems where the back button of the browser needs to do
the same thing as the back button in the form.

We don't support jumping into the form "in the middle", so we ditch any
hash information on init.