Remove inlining special case for effectful GlobalRef in statement position (#45459)
Having an effectful GlobalRef in statement position has been illegal in
IRCode since 39c278b728deb04c3a32d70e3e35dcef7822c0c0. This code predates that
and probably should have been adjusted at the time. It used to not really
cause an issue, but now that we're using ir-flags to determine effectfulness
rather than recomputing it every time, we were littering the IR with
undeleted GlobalRefs. Removing the special case fixes that up and results
in (marginally) smaller and cleaner IR.
Unfortunately, we aren't currently moving static_parameter to statement
position either, even though the optimizer is assuming this elsewhere
(#45490). Add a special case to do it during IR conversion, though it
would probably be better to do it in lowering.