[Web Animations] Refactor cancelDeclarativeAnimationsForElement and willDestroyRender...