dirstate: invalidate the dirstate change on transaction failure
If the change context lives inside a transaction, the change are not flushed to
disk on exit as this is delegated to the transaction. As a result we should
also delegate the part that do cleanup on failure.
The issue was caught by tests with other change, but it seems useful to fix this
as soon as possible.
local test passed
addgroupcopy test passed
clone test passed
lowlevelcopy test passed
slicing test passed
issnapshot test passed
findsnapshot test passed