[mypyc] Generate names lazily when pretty-printing IR or generating C (#9767)
Instead of generating names for ops when building IR, we now generate names
immediately before pretty-printing or generating C. This simplifies `Environment`
and reduces the amount of mutable state we need to maintain. This a step
towards removing the `mypyc.ir.ops.Environment` class.
Also move code related to pretty-printing to `mypyc.ir.pprint`.
Work on mypyc/mypyc#781.