test(matchers.js): make toHaveClass matcher work better for SVG+jQuery
fix(ngAnimate): defer DOM operations for changing classes to postDigest

When ngAnimate is used, it will defer changes to classes until postDigest. Previously,
AngularJS (when ngAnimate is not loaded) would always immediately perform these DOM
operations.

Now, even when the ngAnimate module is not used, if $rootScope is in the midst of a
digest, class manipulation is deferred. This helps reduce jank in browsers such as
IE11.

BREAKING CHANGE:

The $animate class API will always defer changes until the end of the next digest. This allows ngAnimate
to coalesce class changes which occur over a short period of time into 1 or 2 DOM writes, rather than
many. This prevents jank in browsers such as IE, and is generally a good thing.

If you're finding that your classes are not being immediately applied, be sure to invoke $digest().

Closes #8234
Closes #9263
refactor($compile): use labaled variables to represent nodeType values

This also does some cleanup in $animate
chore(ngAnimate): add TODO messages indicating desire to remove hack
perf($animate): don't join classes before it's necessary in resolveElementClasses

In ngAnimate, we can't do this because the behaviour is exposed via the API. But
in core, we can avoid a bit of work.
perf($animate): access DOM less in resolveElementClasses

Previously we were reading DOM attributes frequently, now we can do it just once.
chore(AngularPublic): remove `$$hasClass` from angular exports

It was previously used for ngAnimate, but is no longer needed