dirstatemap: use common code for set_possibly_dirty
Same logic before this make sure both implementation use the same logic for this.
Differential Revision: https://phab.mercurial-scm.org/D11575
#require docutils gettext $ $TESTDIR/check-gendoc fr checking for parse errors