Change AllReduceCommHook to accept instrusive_ptr (#80975)
Summary:
Change class AllReduceCommHook : public CppCommHookInterface<ProcessGroup*>
to class AllReduceCommHook : public CppCommHookInterface<intrusive_ptr<ProcessGroup>>.
Ditto for the related classes as well.
Test Plan:
Covered by existing unit tests.
Fixed #80243
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80975
Approved by: https://github.com/mrshenli