determinism fix: hash results may differ between runs (#1431)
determinism fix: hash results may differ between runs (#1431)

Hash results may differ between runs, as they can depend on pointers. In remove-duplicate-functions, that shouldn't matter, except that we only considered the first item in each hash group vs the others (to avoid O(N^2)), which is fine except for hash collisions (collisions mean 2 groups are merged into one, and considering just the first item vs the rest we miss out on the other duplicates in that single group). And hash collisions do occur (rarely) in practice. Instead, consider all comparisons in each hash group, which should be fine unless we have large amounts of hash collisions.
WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen,WebAssembly/binaryen