Fix infinite loop on macOS with TIMING enabled (#49632)
`jl_pathname_for_handle` calls `jl_load_dynamic_library` internally on
macOS, so naively calling it for our TIMING instrumentation causes an
infinite loop.
This is a simple fix that disables instrumentation when we are
RTLD_NOLOAD'ing the library, which probably makes the trace information
more meaningful as a set of _opened_ libraries anyway.