When the WASM_OPT environment variable is set, run the wasm-opt tool to optimize LLVM's output. Note that using wasm-opt currently means invalidating all debug info, however we can just tell users this when we tell them about WASM_OPT. This fixes PR43796.
Also, add an "llvm-lto" directory to the sysroot library search paths, so that sysroots can optionally provide LTO-enabled system libraries.
What would you think about adding a way to pass arguments through to wasm-opt on the command line, like we have for the linker, assembler, etc? Something like -Wo,-O2 (or -Ww or whatever; analogous to -Wl and -Wa). That seems nicer than an env var, although it doesn't solve the problem of controlling whether to run the optimizer in the first place.