[aot] Add runtime wrappers for methods of generic classes and generic methods. Fixes #16747.