mediawiki.toc.test: Stub $.cookie to avoid test pollution

When running the tests locally the mediawiki.toc tests often
fail because where it asserts hidden it is visible, and where it
asserts visible it is hidden (this happens if you've ever closed
a "toc" section on your local wiki, causes the tests to be one-off).

Change-Id: Idc5e7123f3be3e11dac50d76d13089a2fabcfdb5
Merge "mediawiki.toc.test: Stub $.cookie to avoid test pollution"