Reinstate PrecompileTools-esque caching for REPL (#59850)
REPL precompile scripts runs a workload and might thus encounter code in
other standard libraries that needs to be precompiled. Before #54899 we
had a bespoke variant of PrecompileTools.jl. PrecompileTools was fixed
with #57828 so we can now re-instate the support in REPL.
Noticed by @tecosaur, while looking at #51811