fix($animate): avoid hanging animations if the active CSS transition class is missing

Closes #4732
Closes #4490