Serializing C++ STL objects and primitives (for network use)