Undo generator.py/cli.py refactor.

Reverts 704dc71, 31782a1.

Because Qooxdoo refuses to merge this (
http://bugzilla.qooxdoo.org/show_bug.cgi?id=7238).