feat($location): add support for History API state handling

This is a continuation of #3325, re-created per my e-mail thread with @IgorMinar.

EDIT: new commit message:

Adds $location state method allowing to get/set a History API state via
pushState & replaceState methods.

Note that:
- Angular treats states undefined and null as the same; trying to change
one to the other without touching the URL won't do anything. This is necessary
to prevent infinite digest loops when setting the URL to itself in IE<10 in
the HTML5 hash fallback mode.
- The state() method is not compatible with browsers not supporting
the HTML5 History API, e.g. IE 9 or Android < 4.0.
The more important `copy` is in `Location#state`, though as then we save the state object passed by the user and nothing prevents them from modifying it afterwards (i'd guess it may be common).