Creating a named struct requires only a Context and a name, but looking up a struct by name requires a Module. The method on Module merely accesses the LLVMContextImpl and no data from the module itself, so this patch moves getTypeByName to a static method on StructType that takes a Context and a name.
There's a small number of users of this function, they are all updated.
This updates the C API adding a new method LLVMGetTypeByName2, naming suggestions welcome. I considered LLVMGetTypeByNameInContext, but the LLVM*InContext pattern is used to differentiate between methods that work on the global context and those that don't, and that isn't the case here.
clang-tidy readability-identifier-naming doesn't like 'LLVMGetTypeByName2'. Should I ignore this because it's standard style for the LLVM C API? Or what should I change it to?