[PyTorch][easy] Remove double hash table lookup from Registry::Create
This is inefficient.
Differential Revision: [D36958180](https://our.internmc.facebook.com/intern/diff/D36958180/)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78980
Approved by: https://github.com/ezyang