[sre] Register a canonical reflected method for a methodspec token. (Fixes #60233) (#5814)
* [sre] mono_dynamic_image_register_token: Change asserts to warnings
This partly relaxes the changes in
792b5367cd3a6ffa1a192c4d2d7ace3509cbb646
which added the assertions.
In practice the assertions introduced a crash in heavy uses of
System.Reflection.Emit such as unit testing frameworks and dynamic languages.
We still want to know if there are surprising uses of
mono_dynamic_image_register_token, but we don't need a crash. SRE used to work
before
792b5367cd3a6ffa1a192c4d2d7ace3509cbb646, so no need to break it.
* [test] ILGenerator test for duplicate methodspec tokens
Regression test for [Bugzilla #60233](https://bugzilla.xamarin.com/show_bug.cgi?id=60233)
* [sre] Register a canonical reflected method for a methodspec token (Fixes #60233)
This is like the fix for [bugzilla
59364](https://bugzilla.xamarin.com/show_bug.cgi?id=59364) but this time it's a
methodspec token, not a memberref token.