Replace std::shared_ptr with c10::intrusive_ptr in at::Generator (#36230)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/36230
To make `at::Generator` compatible with `IValue` this PR replaces `std::shared_ptr<c10::GeneratorImpl>` with `c10::intrusive_ptr<c10::GeneratorImpl>`
Differential Revision: D20923377
Pulled By: pbelevich
fbshipit-source-id: 3cb4214900023d863e5f2fe4ea63ec8aeb30936a