Fix file-changed-to-dir and dir-to-file commits (
issue660).
Allow adding to dirstate files that clash with previously existing
but marked for removal. Protect from reintroducing clashes by revert.
This change doesn't address related issues with update. Current
workaround is to do "clean" update by manually removing conflicting
files/dirs from working directory.
% file replaced with directory
adding a
% should fail - would corrupt dirstate
abort: file 'a' in dirstate clashes with 'a/a'
% directory replaced with file
adding a/a
% should fail - would corrupt dirstate
abort: directory 'a' already in dirstate
% directory replaced with file
adding b/c/d
% should fail - would corrupt dirstate
abort: directory 'b' already in dirstate