ngClass + ngAnimate fixes

These fixes ensure that ngClass doesn't abuse the addClass/removeClass DOM operations (which cause ngAnimate to mess up).

Closes #4949
Closes #4960