Adding transition action

Fixes #70 

This changes the API a little for transitions as they now require
knowledge of the event type of the state machine.  Since the state
machine library is still quite beta, updates like this should be
expected.