refactor($location): remove special case for adding a `#` at end of url

Previously, `LocationHashbangInHtml5Url` always added a trailing `#`
to the absolute url that was given to `$browser.url` to prevent page reloads
when the hash fragment was empty.

This refactoring adds a general mechanism in `$browser` to ignore
a trailing `#` during read and add a trailing `#` when the hash fragment
is removed.