dirstateguard: use mktemp-like functionality to generate the backup filenames
Previously these were generated with names like:
dirstate.backup.commit.<memory address of dirstateguard>
This could cause problems if two hg commands ran at the same time that used the
same memory address, (which is apparently not uncommon if chg is involved), as
memory addresses are not unique across processes.
This issue was reported in the post-review comments on
Differential Revision: https://phab.mercurial-scm.org/D10504