This change rearranges some of the code generator logic in LumIDL in such a way that we can use it from other code generators (like the ongoing bridge work).