[reland][c10d] switch ProcessGroup::Work to be managed by intrusive_ptr (#47806)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/47806
reland https://github.com/pytorch/pytorch/pull/44046
Test Plan: wait for ci
Reviewed By: gmagogsfm
Differential Revision: D24905245
fbshipit-source-id: ad75ace5432fcfd22d513878f5a73c4bb017324e