fix($animate): ensure all animated elements are taken care of during the closing timeout

Closes #6395