Fixed concurrency bug

mAnimations.size() needs to be evaluated at every iteration just like
mChildren iteration loop below to ensure the size is updated right away
when animations are unregistered dynamically.
Merge pull request #608 from AndrewJo/animation-rewrite

Fixed concurrency bug