WIP - fix($anchorScroll): fix $digest lifecycle management in `readystatechanged` callback

Wrap the code inside of the listener callback in `$rootScope.$evalAsync()`
to execute inside the Angular context (plus some minor modifications in
the callback).
Also, modified the tests accordingly (introducing `$browser.defer.flush()`
where appropriate).
(Note: The tests pass consistently on Chrome and IE, but sometimes some
tests fail on Firefox (it could be 1 or more). Still working on it.)