fix($location): make behaviour of relative links consistent in html5Mode

3f047704c70a957596371fec554d3e1fb066a29d supposedly made html5Mode work
consistently for both legacy browsers and modern browsers. However, Chrome 34
and Firefox 31 both fail to handle relative links with the default base URL,
at least within an Angular app. This patch allows the URL processing which
occurs for legacy browsers to also occur in modern browsers when html5Mode is
enabled, and corrects this behaviour.

Closes #7151