Fix the directory and revlog collision problem
This adds escaping for directory names so that directory foo.i doesn't
collide with the revision data for file foo.
Fix undo after aborted commit bug
Commit would overwrite undo.dirstate unconditionally, so an undo after
an aborted commit would restore the dirstate from the aborted commit
and not the prior transaction.
This copies dirstate to journal.dirstate and moves it after a
successful transaction.