[JIT] support parameterlist iteration
Followup to https://github.com/pytorch/pytorch/pull/75479.
This adds support for iterating through parameterlists
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76140
Approved by: https://github.com/tugsbayasgalan