[X86][Disassembler] Simplify and optimize reader functions
llvm-objdump -d on clang is decreased from 8.2s to 7.8s.
This appears to have broken bounds checking in some cases.
There don't seem to be any in-tree tests, but the exegesis DisassemblerTest.TooShortABuffer hits an LLVM assertion:
F0113 07:35:07.768071 1340 logging.cc:92] assert.h assertion failed at third_party/llvm/llvm-project/llvm/include/llvm/ADT/ArrayRef.h:250 in const T &llvm::ArrayRef<unsigned char>::operator(size_t) const [T = unsigned char]: Index < Length && "Invalid index!"
I'll try to fix this up.