fix($location): support alternative means of setting application base path

In HTML, the <base> tag is used to configure how relative hyperlinks are resolved. In Angular, it has another use, configuring how URLs are rewritten. Because of this, setting the base URL to some external path outside of the application would cause $location.$$parse() to throw (which is the desired behaviour).

This change enables developers to imperatively configure the application basePath, taking advantage of the natural HTML use of the <base> tag without breaking Angular applications.

Example:

```
angular.module("test", [])
 .config(function($locationProvider) {
   $locationProvider.baseHref("http://foo.com/the/base/application/path/");
 });
```

Closes #4442