Add enum type to rpc registry for consolidating RPC initialization code path (#28628)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/28628
Consolidate code paths of ProcessGroupAgent construction and other RPC Backend construction.
ghstack-source-id: 92845348
Differential Revision: D5516188
fbshipit-source-id: 151d9b7b74f68631d6673fecc74dec525949b8f0