Remove uses of dt_t and IRState from the frontend, and update gluestub.c