[Chapel Merge] dyno: resolve param for loops

Branch: refs/heads/main
Revision: 75e47b0
Author: benharsh
Link: Unavailable
Log Message:

Merge pull request #19998 from benharsh/resolve-param-for-loops

dyno: resolve param for loops

Resolves https://github.com/Cray/chapel-private/issues/3393

This PR implements resolution of param for-loops, the results of which will be stored in the new type ResolvedParamLoop.

We resolve param loops by creating a new Resolver for each iteration, and
storing the collected ResolutionResultByPostorderIDs in a
ResolvedParamLoop result. Each iteration stores a different param
resolution result for the AST representing the index variable.

These temporary Resolvers don't inherit their parent's scopeStacks or
their ResolutionResultByPostorderID values directly. Instead, a
'parentResolver' reference is stored in the Resolver type and used by
'typeForId' to determine whether a parent resolver 'owns' the resolution
results for the desired scope.

The ResolvedParamLoop is finally stored in the ResolvedExpression for
the For loop.