Reduce usage of the loader lock in method lookup.

The function mono_method_inflated_lookup no longer needs the loader lock to be held
as the hashtable is now protected by the imageset lock.

This means that mono_class_inflate_generic_method_full_checked doesn't need to take the
loader lock.

The function mono_method_set_generic_container uses mono_image_property_insert which takes
the image lock and not the loader lock. Adjust the locking comment.
Change mono_class_from_generic_parameter to use the image lock.

We change the function to use the lock/validate pattern. This is both
more scalable and enables us to use the image lock, since the amount of
work done with it held is now trivial.
[runtime] Protect MonoImage::files with the image lock and make image loading optimistic.
Add comment on one usage of the loader lock.
[runtime] Replace the loader lock when protecting the global module map.
[runtime] What MonoImage::ptr_cache with the image lock. Do optimistic locking here too.