Ordered transactions logging

Rewrite of ConsistencyMasterSlave and TransactionRecorder. Manually tested. Unit and integration tests on their way.