JIT: fix case with slow generic delegate creation (#17802)
The jit has been using IR pattern matching to find the information needed for
optimizing delegate construction. This missed one case, causing the code to
use a very slow construction path.
to convey this information to the optimization. With this change the jit now
now relies on the token cache for all the other cases too.
This initial commit preserves the pattern match code and verifies that when
it fires it reaches the same conclusion as the token cache does.
This cross-validation revealed one case where the token information was less
specific than the pattern match so we now also update the method handle in
the token from the call info.
A subsequent commit will remove the pattern matching when we are confident the
new token cache logic handles all the cases correctly.
Closes #12264.