Memrata: transactions

I'm creating a pull request just so it's easy to look at the changes -- this isn't ready to pull.