Format diffs nicely

We’d like to color our diffs. Fortunately, the unified diff format is
easy to parse.

* Split the diff text into lines.
* A line that starts with `@@` is a hunk header. Wrap with `<heading>`.
* Lines that start with a space are context lines. Find the maximum
  sequence and emit it as a single text node.
* Lines that start with `-` or `+` are deleted and added lines. Find
  the maximum sequence and wrap it in an `<del>` or `<ins>`,
  respectively.

Notice also that a hunk header is always followed by a different kind
of line. To simplify code, we can apply the maximum sequence algorithm
to them, too.