Basic implementation of CommandToCancelChanges and slight refactoring to
UnitOfWork to implement discarding.