Fixes Bugzilla https://bugs.llvm.org/show_bug.cgi?id=35467
If a Wasm function section is created with more than one symbol, WasmObjectWriter fails with the following message: "function sections must contain one function each".
Currently, if a C++ file contains multiple static initialisers, they'll all be put in the same function section, triggering the error.
I think this change here is safe - it seems to be a spurious optimisation. In fact, I'm not even sure how it's intended to optimise the output...?