Fix commit list link formatting

Originally, I just wrapped an `<a href="…">` element around the commit
summary. This was all good when the commit summary was just plain
text. Won’t do when it’s rendered markdown, because <a> is an inline
element while markdown typically produces a block element at the top
level.

While it’s possible to style `<a>` as a block element, it makes
for bad user experience: the link takes all horizontal space, so
careless clicks take the user to the linked page.

So we need a function that will take a DOM node and somehow turn “it”
into a link. How would it work?

* The function is initially invoked on the `<li>` element that wraps
  the whole markdown content.
* We want to wrap as long spans of child nodes as possible.
* We never wrap a block element.
* Neither do we wrap another hyperlink.

So:

* Start with the first child of the context node.
* If it is a _restricted_ element (either a hyperlink or a block
  element), or if it contains a restricted element directly or
  indirectly, then stop before it. Wrap the collected span of child
  nodes in a link.
* For a block element or an inline element containing a link, apply
  recursively.
* An inline element containing a block element is technically a
  violation of HTML, but apply recursively anyway.
* For a link, just skip it.
* Continue until there are no more children.