Fix c10d regression during cleanup. (#94988)
This fixes a regression introduced earlier today with a change to c10d global state.
It must be cleaned up in destroy_process_group or root PG and its Store will stay alive.
Fixes regression in test_c10d_nccl.py :: RendezvousEnvTest.test_common_errors
Pull Request resolved: https://github.com/pytorch/pytorch/pull/94988
Approved by: https://github.com/H-Huang, https://github.com/wanchaol, https://github.com/malfet