Only compute effect_free once (#40066)
This is a revival of #33753. While this is useful in itself,
my real goal here is to be able to make use of the computed
effect-freeness earlier to allow removal of calls that the
compiler has shown to be effect-free, but are too large to
inline. This moves in that direction, by making
effect-freeness an SSA flag that an appropriate pass can
then set and that it propagated appropriately by inlining
(since unlike effect-freeness on builtins which is easy
to compute, effect-freeness on generic function calls
requires interprocedural information that we throw
away after inlining into the outer function). While
I'm at it, also refactor the instruction insertion
interface, to make them all use a common type, rather
than random assortments of subsets of the possible fields.