Fixes netName assignment for NCCL Config (#105776)
Fixes #104340
The core issue is described here https://github.com/pybind/pybind11/issues/1168#issuecomment-341969643. Note that NCCL calls free on the netName pointer when destroying the communicator. So memory is safely managed here.
CC: @kwen2501
Pull Request resolved: https://github.com/pytorch/pytorch/pull/105776
Approved by: https://github.com/kwen2501