Implement mw.Title in core
* Based on UploadWizard/resources/mw.Title.js
* Refactored to use local scope and prototypes instead of per-instance private scope (less references, faster instantiation)
* Fix potential ReferenceError in the check for wgArticlePath (inline if statements will fail to evaluate for undeclared variables). Using mw.config instead
* The following were not ported because they are or were already redundant and/or merged with another method:
-- setNameText (redundant with the improved setName)
-- setPrefix (redundant wit the improved setNamespace)
* Ported all jasmine tests to QUnit. Left them exactly the same to make sure it's compatible with UploadWizard. Perhaps I'll expand or adjust the suite later to be less file-specific, but for now make sure it's compatible and the same.
@todo FIXME
* Removed assumption that every title has a namespace prefix in it by creating a separate RegExp when there is a namespace given
** Fixes strip-bug in cases where a namespace appears to be part of a title when the namespace is also given: "Project:User:Foobar"
new mw.Title( 'User:Foobar', 4 ).toString()
> 'Project:Foobar'
** Fixes a thrown exception in case a colon is part of the title (colons are valid in MediaWiki pagenames!)
new mw.Title( 'Just some:Random page')
> Error: mw.Title> Unrecognized canonical namespace: just_some
* Added check for capitalLinks et (wasn't possible before due to bug X)
** Prevents breakages on wiktionary and other wikis with case sensitivity.