Fix HtmlTest, XmlTest; Add setMwGlobals method to base TestCase.

The HTML and XML test now set the globals they depend on
(instead of relying on the default settings).

Tests for the "other" scenarios still exist, globals are
overridden inline. They are automatically restored after each
test## function by PHPUnit from MediaWikiTestCase::tearDown.

Also fixed 2 other problems with the test suite:

* HtmlTest::testDropDefaults forgot to pass
  $message to the assertion from the provider ($case[3]).

* The data provider for HtmlTest::testDropDefaults was calling
  Html::element directly (instead of calling it within the test)
  which is problematic because data providers are expected to be
  static. PHPUnit calls them outside the setUp/tearDown flow.
  (also fixed the function to be public static, as PHPUnit
  expects).

That last one was crucial to make the test still pass correctly.

Updated the expected strings to what they are with these
fixed non-leakage settings.

Took wgHtml5 without xmlform as default. And added tests
for variations where it made sense.

Change-Id: Iccf6ea81f4bc2639273ab2ad101c58788ee49d45
Clean and repair many phpunit tests (+ fix implied configuration)

This commit depends on the introduction of
MediaWikiTestCase::setMwGlobals in change Iccf6ea81f4.

Various tests already set their globals, but forgot to restore
them afterwards, or forgot to call the parent setUp, tearDown...

Either way they won't have to anymore with setMwGlobals.

Consistent use of function characteristics:
* protected function setUp
* protected function tearDown
* public static function (provide..)

(Matching the function signature with PHPUnit/Framework/TestCase.php)

Replaces:
 * public function (setUp|tearDown)\(
 * protected function $1(

 * \tfunction (setUp|tearDown)\(
 * \tprotected function $1(

 * \tfunction (data|provide)\(
 * \tpublic static function $1\(

Also renamed a few "data#", "provider#" and "provides#" functions
to "provide#" for consistency. This also removes confusion where
the /media tests had a few private methods called dataFile(),
which were sometimes expected to be data providers.

Fixes:

TimestampTest often failed due to a previous test setting a
different language (it tests "1 hour ago" so need to make sure
it is set to English).

MWNamespaceTest became a lot cleaner now that it executes with
a known context. Though the now-redundant code that was removed
didn't work anyway because wgContentNamespaces isn't keyed by
namespace id, it had them was values...

FileBackendTest:
* Fixed: "PHP Fatal: Using $this when not in object context"

HttpTest
* Added comment about:
  "PHP Fatal: Call to protected MWHttpRequest::__construct()"
  (too much unrelated code to fix in this commit)

ExternalStoreTest
* Add an assertTrue as well, without it the test is useless
  because regardless of whether wgExternalStores is true or false
  it only uses it if it is an array.

Change-Id: I9d2b148e57bada64afeb7d5a99bec0e58f8e1561
Add version number to deprecated setting

Fix one doc

Change-Id: I527639c3694d7b72d9f3bff62fb8b0b7eb6ee126
Merge changes I9d2b148e,Iccf6ea81

* changes:
  Clean and repair many phpunit tests (+ fix implied configuration)
  Fix HtmlTest, XmlTest; Add setMwGlobals method to base TestCase.
Merge "Add version number to deprecated setting"
Avoid direct access to $wgGroupPermissions

Created a new method User::groupHasPermission and check also
$wgRevokePermissions for the given right

Change-Id: I41edb091fa35c8c68b6f95cc5fd208ea99418cdb