trimming: follow-ups to finalizer support (#58311)
Should cover all the post-review comments from
https://github.com/JuliaLang/julia/pull/58014/
~~Also disables the eager compilation of finalizers unless `--trim` is
enabled, but I'm happy to re-enable that.~~ edit: re-enabled