dirstate: fix rebuild; add a test
If rebuild calls invalidate, it will just queue a (re)read of the dirstate
file, while what we really want is to empty the current state.
checking changesetschecking manifestscrosschecking files in changesets and manifestschecking files0 files, 0 changesets, 0 total revisions