Fix issues with guard serialization on distributed types. (#162418)
Summary:
Add more support for torch internal distributed data structures.
X-link: https://github.com/pytorch/pytorch/pull/162418
Approved by: https://github.com/dolpm
Reviewed By: dolpm
Differential Revision: D81927732
fbshipit-source-id: 50712f0052dff74332a8db3efe9f553b110bc53c