Add protobuf variant sizeOf convenience function