Implement hlfir.elemental inlining as proposed in
flang/docs/HighLevelFIR.md.
This is a separate pass to make the code easier to understand. One
alternative would have been to modify the hlfir.elemental lowering in
the HLFIR bufferization pass.
Inlining is done by splicing the mlir operations form the operations
list of the old block to the new block. We cannot inline by cloning the
operations because this causes pending rewrites and erasures of these
operations not to be performed on the cloned operations.
A hlfir.elemental can only be inlined once; if there are more uses, the
existing bufferization is used instead. It is not possible to splice the
operations to be in multiple places at once - that would require inlining
by cloning the operations.
anonymous namespace + static is redundant.