[TensorPipe] Detect duplicate worker names (#39011)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39011
There's a test for this, so let's implement it. It's very easy.
ghstack-source-id: 104810739
Test Plan: The test now passes.
Differential Revision: D21716068
fbshipit-source-id: 1080040b12913ea0dcc4982182d6b3f6d9ac763c