Various small changes to TransactionManager in preparation for bigger changes
This MR does some smaller changes to TransactionManager
required by #5050 (closed) and #5049 (closed). This mostly serves to make the review of those smaller and easier.
The last commit is from the dependency: !5638 (merged)