fix($location/$browser): prevent infinite digests on empty hash changes

Fixes #9635
Although strictly unescaped # characters are not allowed inside fragments, I guess we have to deal with that case.