Implemented working state machines

Still needs a ton of cleanup. It’s attached to pikmin right now, but
slightly broken.
Fix animation for transitions; animations play now

Choosing not to reset the animation counter when switching to the same
animation; this does mean that if you want to reset the animation’s
current frame, you’ll need to do so manually. Intended behavior to
support loopback edges.
Start work on reimplementing pikmin AI

Once everything’s transitioned over into a state machine, it should
become really easy to implement new pikmin behaviors without breaking
the old ones.