Refactor|libcommon: Implement polyobj (de)serialization in C++, with Reader/Writer