Factor out commit message splitting function

We’ll need this function in at least one more place, so let’s DRY it
out.
Show commit details

Now let’s add an ability to show a specific commit.

In HTML, we add a single `div` for this mode, and inside it a heading
for the commit message summary, a `pre` for the body, and a `section`
for all the diffs.

We style the `commits` list and the `single-commit` div to be visible
only depending on the class of the root `body` element, which we toggle
in specific command handlers.

The `showCommit` function takes a `sha` argument, fetches the commit
details and populates the `single-commit` section.

For now, we are treating everything as plain text.