transaction log improvements

- Add checksum for each transaction.
- Improve performance. Right now the implementation is pretty naive. We can experiment with pre-allocation, reusing log files, etc..
- Add transaction type. With COP (and maybe NEW_LEADER), it would be nice to know transaction type of each record.