Use shared pointers to store animation sources

This ensures references to the sources stay valid as long it the object
is, rather than becoming invalidated whenever one is added or removed.
Be smarter about handling non-moving animations

Don't rely on being told by the play method, so the animation can
automatically change without impacting the character controller.
Make sure active groups are updated after a state is auto-disabled
Fix queued animations
Store whether a given animation loops in the state table