db.fn/cas support

Adding support for compare-and-swap in transact-tx-data.