Adding state.StateMachine and sample usage in README