add fold on simple documents

`fold' makes it possible to compute some value from a document
add a new truncating renderer

a document renderer that allows people to display only an excerpt of the
formatted document depending on one of these criteria:
 - maximum number of non-blank characters
 - maximum number of words
 - maximum number of lines