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.