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
why do you need to extract? the parent node must be an element, so just do `element[0].parentNode` or `elementNode.parentNode`