Transaction stuff.

- Added failing transaction test.
- Added handy gdb thing for tests.
- Some initial transaction support in the DB.
Started replicating the API for transaction use.