Mobile support in MediaWiki core

Rationale
By default, MediaWiki does not offer mobile device-specific support, making MediaWiki sites very difficult to use on mobile devices. This has been mitigated in many ways by Extension:MobileFrontend, however there is much to be gained by building native mobile support into MediaWiki core. Such as:


 * Increased performance
 * A better framework for other extensions to make mobile-specific features
 * Out-of-the-box mobile support for MediaWiki sites
 * A present and future-ready device-agnostic core that can display data in a multitude of different ways, increasing MediaWiki's flexibility
 * Greater developer and end-user support by increasing exposure to mobile-specific issues

Timeline

 * Remove the dependancy on the output buffer by creating a mobile skin [DONE]
 * Move 'mobileaction' features in MobileFrontend to be powered by special pages (to later be reused in core, with the initial benefit of improving MobileFrontend performance and maintainability) [partially done]
 * Have current DOM parsing mechanism of MobileFrontend make greater use of memcached and the native parser cache [needs performance assessment]
 * Move DOM Parsing mechanism into MediaWiki core
 * Make MediaWiki core context/device aware
 * Offer device-specific skins
 * Migrate from using DOM parsing for mobile contexts to the native MediaWiki parser - The future (pending collaboration with VisualEditor team).

Brainstorming notes
Brion's dream: One codebase to do everything except WAP
 * WAP support is just a couple kb of code, we already have a WML skin. 46.44.51.115

Parser conversion
DOM parser currently just strips out things that sould not be present in a mobile view
 * THIS SOULD BE REEVALUATED - are we stripping out the right elements? too many elements?

VisualEditor is going to result in core parser changes (Gabriel working on that?)
 * No idea about timeline (October-ish range?)
 * Can we work with them to make sure they're doing it right and/or get stuff migrated in as they go?

Parser changes are less cut-and-dry than DOM parser, so it's a little scarrier and will probably have a lot of edgey cases

Skinning

 * Can we extend existing skin?
 * Does it make more sense to have one mobile skin? Or let skins support mobile-stuff?
 * Mobile 'fallback' skin?

Special pages

 * Moving actions etc over to special pages will alleviate a lot of current pain points

Etc

 * Make Mediawiki aware of context (mobile or not)
 * for delivering proper URLs
 * Would enable more flexible mobile-specific URL construction
 * eg perhaps with a post-processing hook
 * for resource loading
 * view-related stuff like skin, blah
 * perhaps start by moving dom-parser into core and rely on memcache, rely on key from parser cache