Improve mutexes, move logging outside; improve basic squashing.
Improve buffer usage in ProtoRowBuffer, add minimal unit test.
Merge branch 'tickets/DM-1360'