Invalid syntax could introduce type variables into sequence which
have to be brought into scope otherwise solver is going to crash.
Resolves: rdar://100753270
Replace `AnyFunctionRef` as "context" for syntactic element with
a custom `SyntacticElementContext` to support type-checking of
other constructs in the future.
Split out brace element handling for a couple of
walkers into a new function. The diff for this is
best viewed without whitespace changes. This
should be NFC.