Add handler callbacks to StateMachine

Adds two callbacks to StateMachine that notify its user when (1) a message
is about to be processed in the StateMachine and (2) after the StateMachine
has successfully processed a message and has transitioned to a new
State.

Change-Id: I694793872a22f56b3092f5d8b39a116e385a64da
1 file changed