dirstatemap: small rework of the `set_untracked` method
This shuffle the code a bit to have it flowing more "naturally". This will help
us to create a common version of this code in the next changesets.
Differential Revision: https://phab.mercurial-scm.org/D11569