Extend the statemachine macro

This allow the transition hooks to get the full details
of the transition being undertaken. This is primarily
intended to allow for transaction logging.

Also, add src state information to the failure states since we have
it, and it could be useful.