Now that we apply three annotations to every user memory access, factor it out into a new function to apply them.
We do this for the load and stores, but not yet the atomicrmw's.
This removes its last connection to the implementation details of having a wasm_module, which we don't want to have to rely on when building trampolines.
There currently isn't a RelocationTarget for a trampoline function that refers to itself (none of been observed to done so yet), so we make the RelocationTarget optional.
LLVM will number instructions if you don't provide a name, so we get %7 instead of %s7 from calling state.var_name(). LLVM doesn't assign the numbers until printing out the LLVM IR as text, which we never do in a normal run of wasmer.
If you're editing a .ll text by hand and you're worried about messing up the numbering, use `opt --instnamer` to assign autogenerated names to all numbered instructions.
To add to the cache, mutability is required, so now `resolve_memory_ptr` must be `&mut self` which means that `translate_operator` may not hold those convenient immutable references across the whole function.
The search and replace to implement the above changes affected some commented out code, that code is removed.
MemoryStyle grows PartialEq and Eq so that we can check what the memory style is without a match expression.
This rewrites the whole relocation parsing to work properly.
* we no longer use LocalRelocation and simply assign a new SectionIndex as new sections are encountered.
* we no longer use string matching to determine what function applies relocations to what, instead we use the field in the elf section header that tells us
* we no longer merge sections, each section from every function is preserved as an independent custom section in the module.
* we now discover any new sections that need to be pulled in recursively as we parse each section
* many error cases are either handled, or report CompileErrors.