fix($location): strip off empty hash segments when comparing

The url is the same whether or not there is an empty `#` marker at the end.
This prevents unwanted calls to update the browser, since the browser is
automatically applying an empty hash if necessary to prevent page reloads.

Closes #9635
fix(ngSanitize): exclude smart quotes at the end of the link

When smart quotes are included in content filtered through linky, any
smart quote at the end of a URL string was being included in the link
text and the href.

Closes #7307