WyC: Transcribed documentation for CodeGenerator.

When the OldCodeGenerator replaced CodeGenerator, a lot of useful
documentation was lost in the process.  However, I've now gone through
and manually recovered this documentation so that it's not lost.  In
fact, there's some good stuff there!!  Also, some simple tweaks which
reduced the code in the current CodeGenerator.