fix($animate): abort class-based animations if the element is removed during digest

Prior to this fix, if the element is removed before the digest kicks off then it leads
to an error when a class based animation is run. This fix ensures that the animation will
not run at all if the element does not have a parent element.

Closes #8796
I don't quite get this check. it's not like we are traversing up until the $rootElement (even though the comment above makes it sounds like it).