Fix tests causing trouble for the AOT compiler by not building those tests on
device (they're testing error conditions in the simulator, which means it's
acceptable to exclude these tests for device builds).
This fixes an AOT-compiler assert:
> * Assertion at /Users/builder/data/lanes/1381/d264709b/source/xamarin-macios/external/mono/mono/metadata/marshal.c:8497, condition `sig->param_count == invoke_sig->param_count + 1' not met
due to invalid [MonoPInvokeCallback] attributes.
* Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as the trampoline.
Change BlockLiteral.SetupBlock to keep a reference to the delegate passed as
the trampoline, so that it's safer for normal users (crashes due to incorrect
usage are rare and random, and as such they're also hard to track down).
Additionally introduce a BlockLiteral.SetupBlockUnsafe method, that still has
the old behavior, so that we can use it in our own (reviewed) code.
* [ObjCRuntime] Add some validation to BlockLiteral.SetupBlock.
* Use BlockLiteral.SetupBlockUnsafe instead of .SetupBlock
Use SetupBlockUnsafe in our own code, because we know our own code is using it
correctly (by passing a trampoline stored in a static field, so that the GC
doesn't free it).
* [tests] Fix xammac tests build.