add $this->maxDepth to serialize / unserialize

Serialize/unserialize VirtualPropertyMetadata including maxDepth. Otherwise DepthExclusionStrategy fails when using with virtual properties and cached metadata.