[AOTI] Update cpp wrapper codegen to use v2 C shim (#120714)
Summary: To use the torchgen-ed v2 C shim interface, cpp wrapper codegen needs to update its rule for generating the right parameter and function call. Because changing the emitted code will cause a FC breakage, we add a flag to control the behavior.
Differential Revision: [D54258086](https://our.internmc.facebook.com/intern/diff/D54258086)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/120714
Approved by: https://github.com/chenyang78
ghstack dependencies: #120513