refactor(locationSpec): make helper functions take an object

Makes tests more readable
fix($location): revert erroneous logic and backport refactorings from master

Backport of 22948807e324eb0b182b15b31045dc306a9f3231 without enforcing the `<base>` tag and without the new handling for links that only contain hash fragments.

Related to #6162
Closes #8492
test($location): fix use of browserTrigger

You must now pass `keys` to the function in a config object.
This bug in the test became apparent because in newer browsers, arrays
have a function called `keys()` and this was causing browserTrigger to
fail. Previously it was quietly passing this test despite being wrong.
docs($location): clarify guide regarding link handling

The trick with setting `<base href=".">` has not worked since Angular 1.2.0.
It is also misleading that it talks about `$routeProvider.otherwise`
which is not important in this case.

Related to #8869
Closes #8908