[PTE] Adding `prim::to_list` to be emitted (#72238)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72238
Adding missed operator to be emitted either as operator (version 7 and below) and as an instruction (version 8 and above)
ghstack-source-id: 148278722
Test Plan: CI
Reviewed By: JacobSzwejbka
Differential Revision: D33970756
fbshipit-source-id: 876f0ea48dde2ee93fa40d38a264181e2fcf42ce
(cherry picked from commit f2666f99acaf9efa1a066f22319962e841209d54)