transaction: clarify the logic around pre-finalize/post-finalize
I am taking a bit more verbose route, but I find it easier to follow for people
who (re)discover the code.
(This is a gratuitous cleanup I did while looking at something else.)
Differential Revision: https://phab.mercurial-scm.org/D8176
#require black
$ cd $RUNTESTDIR/..
$ black --config=black.toml --check --diff `hg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/**'`