Add protobuf serialization for Loom

TODO make protobuf serialization optional