codegen: make emit type env aware
codegen: make emit type env aware

Add a `ParamEnv` argument to the `emit_type` and `emit_type_uninterned`
functions. This will allow them to issue type queries on their own,
which will be needed for enums and structs.

fabianschuiki/moore,fabianschuiki/moore,fabianschuiki/moore,fabianschuiki/moore,fabianschuiki/moore