[jit] Added an API to remove list mutations and replace with variadic cat until fixed point (#60776)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/60776
Test Plan: Imported from OSS
Reviewed By: eellison
Differential Revision: D29406099
Pulled By: navahgar
fbshipit-source-id: e2e69eb6ebff3bc6e25d80f46ce118e52f557fb6