[JIT] Fix compilation unit reference link in constant object upon load (#65784)
Summary:
Follow up to https://github.com/pytorch/pytorch/pull/65442, make sure objects inserted into the graph from load do not holding owning reference.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65784
Reviewed By: suo
Differential Revision: D31251033
Pulled By: eellison
fbshipit-source-id: 59efe19ce6f70744383de4eebf0f89f79f3eb03a