Avoid copy contents in SerializedPyObj (#34490)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/34490
Differential Revision: D20347465
Test Plan: Imported from OSS
Pulled By: mrshenli
fbshipit-source-id: d59e74e3ee9122992a5c50a083e43ab31b7a70f5