HTMLTemplates moved to Text.

This module was particularly awkward because Text doesn't really lend
itself to ShowS stuff, which this was full of. So a lot of the internals
had to be rewritten.