More boilerplate elimination.

- Add GenericOutputmodule.
- Convert print output module to use it.

Conversion of other output modules still pending.