[WebAssembly] Backport custom import name changes for LLVM to 8.0.
Specifically, this backports r352479, r352931, r353474, and r353476
to the 8.0 branch. The trunk patches don't apply cleanly to 8.0 due to
some contemporaneous mass-rename and mass-clang-tidy patches, so
this merges them to simplify rebasing.
r352479 [WebAssembly] Re-enable main-function signature rewriting
r352931 [WebAssembly] Add codegen support for the import_field attribute
r353474 [WebAssembly] Fix imported function symbol names that differ from their import names in the .o format
r353476 [WebAssembly] Update test output after rL353474. NFC.
By Dan Gohman!