Make Mercurial's man page and HTML help group commands by category, and
present the categories in a helpful order. `hg help` already does this;
this patch uses the same metadata.
This patch uses the same header level for command categories, and for
commands. A subsequent patch will push the command headers down one