Results 11 issues of pchintalapudi

This continues from #46175 and enables NewPM on all of our optimization pipelines, unless ASAN is active. This is because the combination of ASAN, our JIT, and NewPM results in...

codegen
llvm

This coopts half of #44968 to mark jl_code_instance_t fields as either atomic or const. The typeinf lock changes are left for a future PR.

inference

By leveraging JITLink, we can obtain lazier compilation provided by LLVM. Because we're using JITLink though, we only support platforms which JITLink can operate on (at the moment only M1...

# There's no way to save the application without submitting it

Previously we verified LLVM modules in some optimization passes, which have already caught a number of llvmcall errors previously. This PR just standardizes their location to be around optimization pipeline...

llvm

Also use MappedJITLinkMemoryManager on >= LLVM 15 for JITLink.

merge me
llvm

The NewPM changes have gone in under a #define statement due to verification errors; this PR will be used to track how many of those errors still exist.

Depends on #46825 for type inference lock removal.

This is the last section of code that refers to the old type inference lock, so now it gets its own mutex to itself.