Add initial implementation of transaction API.
Provide a test journal. It's just a wrapper to bwrite and doesn't
actually do any journaling, but we need something to give the
transactions to.
Sync with head.