Doc autogeneration cleanups and minor improvements
- Do not put function signatures in docstrings, only to later read them back.
- Only strip '-markup' at the end of markup command names. Fixes #6580 (closed)
- Mark certain markup commands as internal, preventing them from appearing in the manual.