gendoc: nest command headers under category headers
Differential Revision: https://phab.mercurial-scm.org/D6329