[AOTI][refactor] Move a few util functions in atoi_torch (#119987)
Summary: Move these util functions from an anonymous namespace to a common header so that later torchgen-ed files can use them.
Differential Revision: [D54258088](https://our.internmc.facebook.com/intern/diff/D54258088)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/119987
Approved by: https://github.com/chenyang78