staticdata: Don't discard inlineable code that inference may need (#58842)
See
https://github.com/JuliaLang/julia/issues/58841#issuecomment-3014833096.
We were accidentally discarding inferred code during staticdata
preparation that we would need immediately afterwards to satisfy
inlining requests during code generation for the system image. This was
resulting in spurious extra compilation at the first inference after
sysimage reload. Additionally it was likely causing various unnecessary
dispatch slow paths in the generated inference code. Fixes #58841.