fix($animate): ensure class-based animations are always skipped before structural digests are run

Closes #5582