subrepo: be more careful with deletions of .hgsub and .hgsubstate (issue2844)
We shouldn't try to process subrepos if .hgsub isn't present and we
should remove .hgsubstate if .hgsub is marked for removal.
To run the tests, do:cd tests/python run-tests.pySee http://mercurial.selenic.com/wiki/WritingTests formore information on writing tests.