Pass group ranks and options to third party distributed backends (#73164)
Fixes #73163
PyTorch's [_new_process_group_helper()](https://github.com/pytorch/pytorch/blob/9f541aa3aca768e7fbfa4a9d648b554f22b261f7/torch/distributed/distributed_c10d.py#L633) does not pass group's participating ranks to the backend.
This PR adds the above capability. Also, refactors some variables for better clarity.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73164
Approved by: https://github.com/kumpera