move //tools/codegen:codegen into shared build structure (#74386)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74386
This is currently only used by Buck.
ghstack-source-id: 152438661
Test Plan: Rely on CI.
Reviewed By: malfet
Differential Revision: D34971529
fbshipit-source-id: 2e0f1c84c46bd659ae8ab90b266a478775f7b0da
(cherry picked from commit ea8e3a838e89d5360243cd36bce1798fbbda3143)