Fix bug in TxLog handling of null-bytes in log files
Refactor and clean up TxLog

There is still more that can be done, but hopefully it is now a little more readable and
in line with our house style. The parsing could for instance be split out into its own
class.
Organise imports.
Merge pull request #1427 from chrisvest/fix-tm-log-duplicates

Fix tm log duplicates