cli: implement StateMachine.rollback()

StateMachine.rollback() is triggered when an error occurred during
logical state transition, such as connection failure in 'connect'
command,

calling rollback() will return StateMachine to the origin state
whatever it was before the failure.

Change-Id: Ideaf855e2475bd39cf15454b09aa8add0fc08726
Signed-off-by: Michael Pasternak <mishka8520@yahoo.com>