Fix nondeterminism in GlobalStructInference (#5092)
Fix nondeterminism in GlobalStructInference (#5092)

We append to vectors of globals in a nondeterministically-ordered loop, which can lead to
different orderings of the vectors. This happens quite frequently in very large J2Wasm
files it turns out. As a solution, simply sort them after the nondeterministic stage.
WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen