[jit] Change the sgen vector allocator il code so it can be AOTed.
[jit] Add an optimization to use the optimized delegate invoke trampolines in some special cases, since the corresponding delegate invoke wrappers cannot be AOTed. Fixes part of #17423.