Fix OS detection in config.py

Change sys.platform.find("win") to sys.platform.startswith("win") to not detect
dar"win" as "win"dows.
quality_assurance: refactoring

Refactored the Mistkerl class to be more readible. Removed some unused code.
quality_assurance: detect vast number of headings with same level

Some editors tend to mark headings in slides as heading. If the author of the
slides tends to have a lot of slides, this gets very quickly confusing,
especially in the table of contents. The editor may therefore either decrease
the tocDepth or the number of headings.