Added IStateMachineFactory interface and implementation

They are needed to correctly run integration testing for storages