Improve buffer usage in ProtoRowBuffer, add minimal unit test.