deepcopy() of Objects should call __g/setstate__ (#39500)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/39500
Test Plan: Imported from OSS
Reviewed By: suo
Differential Revision: D21875091
Pulled By: jamesr66a
fbshipit-source-id: 105875dd220a91bc4fcb8fcfb77fab8b626eb6cb