Migrate THCState to ATen (#66765)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/66765
This guts `THCState` to simply be an empty struct, as well as:
- moving `THCState_getPeerToPeerAccess` and its cache into `ATen`.
- cleaning up dead code in `THCGeneral.cpp`
- moving `THCudaInit` and `THCMagma_init` into `CUDAHooks::initCUDA`
Test Plan: Imported from OSS
Reviewed By: zou3519
Differential Revision: D31721648
Pulled By: ngimel
fbshipit-source-id: 772b24787656a95f9e3fcb287d912b1c3400f32d