improve namespace related methods
MWNamespace::getTalk() could give erroneus results when using it on specials
namespaces (NS_MEDIA, NS_SPECIAL). It now use MWNamespace::isMethodValidFor()
which will throw an exception if a special namespace was given.
MWNamespace::getSubject() is now returning identity for specials namespaces.
New MWNamespace::getAssociated() used to find out the subject page of a talk
page and vice versa. Special namespaces will results in an exception.
TESTS:
Added tests for almost complete code coverage. Functions relying on global
$wgCanonicalNamespaces are still incomplete though.
MWNamespace::isMovable() needs more assertions.
Tests results (ignoring incomplete tests output):
$ php phpunit.php --filter MWNamespace
PHPUnit 3.5.10 by Sebastian Bergmann.
.........IIIII..........
Time: 1 second, Memory: 31.75Mb
OK, but incomplete or skipped tests!
Tests: 24, Assertions: 99, Incomplete: 5.