this doesn't look right to me. if the url contains `#` then we should ignore `?c=d` since that's the fragment part.

the conversion from html5 urls to hashbang urls should parse the url into segments and then remap the proper segments into the virtual namespace with url fragment.

given `http://server/base?a=b#!?c=d` as html5 url, it should be parsed into:
- base: `"/base"`
- path: `""`
- query: `{a: 'b'}`
- hash: `"!?c=d"`

to convert this into the hashbang url we should end up with:

`http://server/base#?a=b#!?c=d`

the parsed representation of this url is the same as what we had for html5 url.