Ref T1460. Ref T6403. Replace Diffusion::INLINEDONE with Transactions::INLINESTATE and generalize things enough that we can lift it into core.
The next change will lift Differential's similar implementation into the core.
Also start implementing a fix for T6403, providing an alternate hook for optional builtin transactions.