hashchange: Update state.old_hash before returning early.
hashchange: Update state.old_hash before returning early.

This fixes a bug where you can’t open the same overlay twice in a row
in IE 11, which doesn’t support HashChangeEvent.oldURL; it was exposed
by commit 05be16e051b1fd797429ff50cb90644543730a17 (late 2018).

While here, parse the hash from oldURL in a less ad-hoc way.

Signed-off-by: Anders Kaseorg <dfdb7392591db597bc41cf266a9c3bc12a2706e5@zulipchat.com>

andersk/zulip,timabbott/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,andersk/zulip,timabbott/zulip,punchagan/zulip,synicalsyntax/zulip,punchagan/zulip,eeshangarg/zulip,andersk/zulip,showell/zulip,punchagan/zulip,rht/zulip,rht/zulip,eeshangarg/zulip,rht/zulip,eeshangarg/zulip,zulip/zulip,andersk/zulip,kou/zulip,hackerkid/zulip,showell/zulip,showell/zulip,synicalsyntax/zulip,shubhamdhama/zulip,brainwane/zulip,zulip/zulip,synicalsyntax/zulip,showell/zulip,rht/zulip,timabbott/zulip,brainwane/zulip,eeshangarg/zulip,shubhamdhama/zulip,kou/zulip,showell/zulip,zulip/zulip,showell/zulip,showell/zulip,brainwane/zulip,kou/zulip,brainwane/zulip,synicalsyntax/zulip,hackerkid/zulip,timabbott/zulip,shubhamdhama/zulip,shubhamdhama/zulip,punchagan/zulip,hackerkid/zulip,brainwane/zulip,shubhamdhama/zulip,synicalsyntax/zulip,eeshangarg/zulip,shubhamdhama/zulip,zulip/zulip,rht/zulip,timabbott/zulip,brainwane/zulip,zulip/zulip,andersk/zulip,punchagan/zulip,eeshangarg/zulip,andersk/zulip,brainwane/zulip,punchagan/zulip,hackerkid/zulip,kou/zulip,timabbott/zulip,hackerkid/zulip,kou/zulip,eeshangarg/zulip,zulip/zulip,andersk/zulip,synicalsyntax/zulip,synicalsyntax/zulip,kou/zulip,rht/zulip,shubhamdhama/zulip,timabbott/zulip,hackerkid/zulip,zulip/zulip,rht/zulip