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.