string: Fix `to_cmangle` to always produce valid C identifiers.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
string: Fix `to_cmangle` to never end with an underscore.

This permits to use two underscores as a separator between two mangled
names (like Nitdoc does).

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
nitdoc: Document constraints on `nitdoc_id`.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
nitdoc: Mangle names in IDs.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
nitdoc: Remove the project’s name from the groups’ IDs.

A project is only a wrapper on a group.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
nitdoc: Shorten redundant IDs.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>
nitdoc: Avoid HTML ID collisions.

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>