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

Fixes #9635