Support for event triggered transitions

implements #31 , similar functionality to aasm