fix($location): don't rewrite hash-fragment links in same document

$location will no longer rewrite hash fragment links in the same document
(specified via href="#hash...").

Closes #8478