dirstate: only reload the dirstate when it may have changed
This reinstall the equivalent of what the `filecache` was doing. However it does
it at the dirstate level.
There is a double motivation for this:
- This avoid duplicating logic with the dirstate "identity" logic.
- This increase the lifetime of the `dirstate` object, helping to implement
change scoping.
{
"conduit_uri": "https://phab.mercurial-scm.org/api",
"phabricator.uri": "https://phab.mercurial-scm.org/",
"repository.callsign": "HG",
"arc.land.onto.default": "@",
"base": "hg:.^"
}