[lld][WebAssembly] Implement --unresolved-symbols
This is a more full featured version of `--allow-undefined`.
The semantics of the different methods are as follows:
Report all unresolved symbols. This is the default. Normally the linker will generate an error message for each reported unresolved symbol but the option ``--warn-unresolved-symbols`` can change this to a warning.
Resolve all undefined symbols to zero. For data and function addresses this is trivial. For direct function calls, the linker will generate a trapping stub function in place of the undefined function.
Generate WebAssembly imports for any undefined functions. Undefined data symbols are resolved to zero as in `ignore-all`. This corresponds to the legacy ``--allow-undefined`` flag.
The plan is to followup with a new mode called import-dynamic which
allows for statically linked binaries to refer to both data and
functions symbols from the embedder.
Differential Revision: https://reviews.llvm.org/D79248