Incorrect nested state behaviour fixed

Multiply nested states are now correctly traversed: entryStates are
followed down the family tree until a state without an entryState is
found.

When a transition returns a state the same as the current state,
entry/exit actions should not be called. This only worked for a single
nesting level, and only for entry actions. Now it works for multiply
nested states and for both entry/exit actions.
Transition action can now also access next state's data
Added a test/example testing multiply nested states
Documentation updated and fixed