emit a <className>-done event when an animation is finished

It would be nice to be able to know when animations are done. This change emits a '<className>-done' event which could be used to coordinate actions to take place after an animation has finished.