Fairly major changes to improve latched button detection.
The real question here is:
Q. If a button is latched in the forest, and no-one is there to see the original state, did it get pressed or not?

We'll leave the philosophers to debate that one.  The big problem with my original code was that the input AI was handling overwriting the old button states when new button states came in.  So, button states enter, copy the last read state to old state, write the new states to current state.

The problem with this is that if you're trying to latch button states from another AI, you will only make a latch transition if the code is running fast enough.  Because what will happen the majority of the time is that the button state will be written behind you by the input AI (especially in the OUYA case since button states aren't polled and happen very quickly) so that when you go to read them with your state AI, Old value always == New value.

The solution then is to allow the state AI to control when current state is copied to the old state.  This is accomplished simply enough by calling onUpdateOldKeyStates at the end of the input loop.  There is an example in the documentation.  Needless to say, latched states are rock solid now!