add state machine callbacks

Hello,

Here is a patch to add callbacks on state machines.

For instance, this allow to stub methods in a specific state only:

    state= states('state_machine').starts_as('first_state')
    state.enter_state('second_state') { my_object.subs(:my_method) }
    state.exit_state('second_state') { my_object.unstub(:my_method) }