[loader] Pass predicate callback to mono_assembly_load_from_full
Actually create a new mono_assembly_load_from_predicate () and call that from
the old mono_assembly_load_from_full ().
This function is responsible for creating brand new MonoAssembly* values and
then committing them by calling mono_assembly_invoke_load_hook(). So if we
would like to have a chance to reject a candidate assembly from loading for
some reason, this is the only place we can do it:
* anywhere before the call to mono_assembly_load_from_predicate there is no
MonoAssembly* yet.
* anywhere after mono_assembly_load_from_predicate returns, the load hook was
already called (in a plain vanilla Mono, there's an installed load hook
called mono_domain_fire_assembly_load () which caches the MonoAssembly* in
the domain that requested the load - after that point we cannot possibly
consider another MonoImage* for the same MonoAssemblyName - the appdomain
will always return the cached one).
The next commit will use this predicate to reject some strongly named
assemblies when the candidate assembly doesn't exactly match the wanted
MonoAssemblyName. (Note that load_from doesn't have the MonoAssemblyName that
was requested, so we'd have to thread /something/ down here - might as well be
a predicate function.)