[JIT] Move stuff out of class_type.cpp (#33900)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/33900
These functions don't require any libtorch-specific functionality, so move them into the header so they're included in the ATen build
Test Plan: Imported from OSS
Differential Revision: D20175874
Pulled By: jamesr66a
fbshipit-source-id: 1efab1b60e196a635e6c6afadb042b63771170f0