The TableGen implementation was using a homegrown implementation of FunctionModRefInfo. This switches it to use MemoryEffects instead. This makes the code simpler, and will allow exposing the full representational power of MemoryEffects in the future. Among other things, this will allow us to map IntrHasSideEffects to an inaccessiblemem readwrite, rather than just ignoring it entirely in most cases.
A caveat here is that this includes a header from IR in TableGen. I think this should be unproblematic as long as IR/ModRef.h doesn't itself depend on any TableGen-generated headers. Alternatively, it could be moved into Support, but that feels somewhat out of place.