Remove all IRState functions from codegen.  Rename IRBase to IRState.