Fix pickling for Tensor subclasses. (#47115)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/47051
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47115
Reviewed By: ejguan
Differential Revision: D24649817
Pulled By: ezyang
fbshipit-source-id: 1872faa3603085f07c0a8a026404161d0715720d