[WebAssembly] Add more error checking to object file parsing

This should address some of the assert failures the fuzzer has been
finding such as:
  https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6719

Differential Revision: https://reviews.llvm.org/D47086

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333459 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed