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.
abort: repository a not found!
255
abort: error: Connection refused
255
abort: repository a not found!
255
abort: destination '../a' already exists
255
abort: repository a not found!
255
destination directory: q
abort: destination 'q' already exists