More support for summary templates.

This time, in the form of a couple helper functions for header and time
formatting.

A couple of things left after this: dealing with extra blank lines from
text/template, and CRLF instead of just LF.