compact: Propagate IR_FLAG_REFINED (#50286)
This is a more invasive version of #50281, implementing alternative 2.
Because this solves the same problem, the motivation is the same, so
quoth much of the commit message:
In #49340, I added an ir flag (currently only set by sroa) to allow
sparse-reinference of ir after optimization passes that may improve
type information. However, as currently implemented, this flag gets
dropped when the IR is compacted, defeating the purpose of the flag,
because it can no longer be reliably used for sparse re-inference.
This commit adds a special `Refined` marker in ssa_rename that lets
compact propagate the IR_FLAG_REFINED flag to any users of statements
that may have been compacted away.