Implement 'witness Buy' framework, except for Mint
Add Mint to Buy-trigger
Implement 'witness Gain' framework
Implement stub 'witness pre-gain' framework
Fix test breakages