fix($location) don't rewrite location when clicking on "javascript:" or "mailto:" link

Previously, absent a specified target attribute, when clicking on an anchor tag with an href beginning with either "javascript:" or "mailto:", the framework would rewrite the URL, when it ought not to.

With this change, the browser is prevented from rewriting if the URL begins with a case-insensitive match for "javascript:" or "mailto:", optionally preceeded by whitespace.

Closes #8407
Closes #8425