ToC depth front-end cleanup to match the backend.
Corresponding CSS fix for previous.
Merge pull request #993 from ubernostrum/toc-limit-845355

ToC depth front-end cleanup to match the backend.