Optimize type casts (#14420)
JIT: optimize type casts
Implement the jit interface compareTypesForEquality method
to handle casts from known types to known types, and from
shared types to certain interface types.
Call this method in the jit for castclass and isinst, using
`gtGetClassHandle` to obtain the from type. Optimize sucessful
casts and unsuccessful isinsts when the from type is known
exactly.
Undo part of the type-equality based optimization/workaround
in the AsyncMethodBuilder code that was introduced in #14178
in favor of interface checks. There is more here that can
be done here before this issue is entirely closed and I will
look at this subsequently.
This optimization allows the jit to remove boxes that are
used solely to feed type casts, and so closes #12877.