Add sprite:on_animation_changed() and on_direction_changed() (fix #153).