textgen: Move common code into a common file.

Reduce code duplication by refactoring the textgen and smtextgen
scripts.
textgen: Add image include support for smtextgen.

Instead of generating text and image parts in separate stages, add
the ability to include an image in the smtextgen command line. This
makes the command line in the Makefile clearer.
textgen: Generate CREDIT screen.

This is one of the screens of text shown between demos in the demo
loop. Generate this from the contents of a static text file. I
originally wanted to generate this programatically from the CREDITS
file but there are too many contributors to fit them all on the page.