sparse: clear rules in the context of a `parentchanges` context
This is the same logic as the change we did for narrow.
Differential Revision: https://phab.mercurial-scm.org/D11029
sparse: make sure we adjust the dirstate at the same time as the parent
This is more correct and help our API split.
Differential Revision: https://phab.mercurial-scm.org/D11028
narrow: update narrow spec within a dirstate.parentchange context
Even if the parents does not changes, the parents' content we consider is
changed. So this seems legitimate.
Differential Revision: https://phab.mercurial-scm.org/D11027