Make casting helpers look more like in CoreCLR (#86029)
* Make casting helpers look more like in CoreCLR
Speeds up casting to interfaces by about 50%. Speeds up casting to classes by about 20%.
There are small differences compared to CoreCLR:
* NativeAOT runtime considers interfaces implementable by arrays to be variant. We don't need to special case casting arrays to non-variant (in IL sense) interfaces because those naturally take the variant paths.
* The base type field on arrays holds the array element type so we need to check for the array case before starting to chase the base hierarchy.
Otherwise the top level helpers now look mostly the same as the CoreCLR ones.
* Make it tailcallable
Co-authored-by: Jan Kotas <jkotas@microsoft.com>