[runtime] Use the image lock in mono_type_from_typespec () instead of the loader lock. Also do most of the work outside the lock.