Make `Base.disable_library_threading_hooks` ephemeral to the process (#59232)
This prevents accidentally registering hooks during the sysimage build
that would persist to run-time (unlike what happens when registering
hooks while building a pkgimage)
~~Required for https://github.com/JuliaLang/LinearAlgebra.jl/pull/1407~~