Make classtypes hold a weak_ptr to their CU
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/22902
Test Plan: Imported from OSS
Differential Revision: D16278159
Pulled By: suo
fbshipit-source-id: 6aa682e347847e808b44218d38ff1dae66945a07