Devirtualize device init calls in factory op wrappers (#37815)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/37815
Generated device-specific wrappers for Tensor factory ops now call
methods on `globalContext()` directly, rather than indirecting
through `globalLegacyTypeDispatch()`, which we can now delete.
Test Plan: Imported from OSS
Differential Revision: D21398294
Pulled By: bhosmer
fbshipit-source-id: b37bc67aa33bfda6f156d441df55ada40e9b814d