unit test for the whole serialization process

Interface Input DataInput anf DataOutput need to be revised, but I left them unchanged
I don't think so, InstancePot is designed to cache objects for serialization, we do not need this extra data structure for deserialization.