Spun out of T297611
When determining whether or not to show the new ToC, the same rules that govern the current ToC should be applied. If the ToC is currently hidden via magic words like `__NOTOC__` or by other means, it should remain hidden in this update.
# Developer notes
- If __NOTOC__ is present in the page, SkinMustache still gets the data needed to render the table of contents. We'll need to change the core code, to provide some indication that the table of contents was disabled to support this change.
- `Skin::getSectionsData` should return null when __NOTOC__ is used. Attached POC patch uses `OutputPage::isTOCEnabled` in core - returns false when NOTOC magic word is present. See thread in #content-transformers channel re: `OutputPage::isTOCEnabled` usage https://wikimedia.slack.com/archives/C024Z8K9CAU/p1642090580148800
# QA steps
NOTE: Someone will need to enable the table of contents on the beta cluster before this can be tested.
With the new Vector skin:
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Table_of_contents_test_page?tableofcontents=1 and confirm the table of contents is visible in the sidebar
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Table_of_contents_NOTOC_test_page?tableofcontents=1 and confirm the table of contents does not display in the sidebar or the article
== QA Results - Beta
| **AC** | **Status** | **Details** |
| ----- | ----- | ----- |
| 1 | ✅ | T298796#7671121 |
| 2 | ✅ | T298796#7671121 |