fix($browser): colon in url causes infinite digest in FF

Bug found when an angular app is running in an iframe + has a colon in the query string in Firefox. This stops angular from working until the page is refreshed, errors are: 

```
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [["fn: $locationWatch; newVal: 7; oldVal: 6"],["fn: $locationWatch; newVal: 8; oldVal: 7"],["fn: $locationWatch; newVal: 9; oldVal: 8"],["fn: $locationWatch; newVal: 10; oldVal: 9"],["fn: $locationWatch; newVal: 11; oldVal: 10"]]
```
(fixed with the addition to line 178)
and 

```
Exception { message: "", result: 2147500037, name: "NS_ERROR_FAILURE"}
```
(fixed with the addition to line 125).

What is happening is that Firefox's location.href encodes colons (after string position seven) to %3A. This doesn't match with other encoding and the app gets stuck. For example, we were passing in an absolute url through the query and getting issues; it also happened with the port on localhost. Very similar to: [#920](https://github.com/angular/angular.js/issues/920). 
To reproduce, just run a small app locally in Firefox (I was able to recreate with angular phonecat) in an iframe.  

```
<html>    
    <body>
        <iframe src="http://localhost:8000/app/index.html#/?url=https:www.google.com>
    </body>
</html>
```
I just tried to mimic the described FF behavior without angular. The test
looks fishy to me. It just test that we rewrite the url without actually
reproducing the browser issue. That would be fine if at least we could
repro the browser issue in isolation but we can't.
On Aug 22, 2014 5:50 PM, "Caitlin Potter" <notifications@github.com> wrote:

> In test/ng/browserSpecs.js:
>
> > @@ -466,6 +466,11 @@ describe('browser', function() {
> >        expect(browser.url()).toBe("http://ff-bug/?single'quote");
> >      });
> >
> > +    it('should decode colons to work around FF bug', function() {
> > +      fakeWindow.location.href = "http://ff-bug/?https%3Awww.google.com";
> > +      expect(browser.url()).toBe("http://ff-bug/?https:www.google.com");
>
> This test is also not verifying that you're preventing an infinite digest
> error, which is what this bug is about
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/angular/angular.js/pull/8734/files#r16627434>.
>