nodemap: make sure on disk change get rolled back with the transaction
In case of errors, we need to rollback the change made to the persistent nodemap.
Differential Revision: https://phab.mercurial-scm.org/D8191