Requests for comment/MediaWiki libraries

This is a request for comments regarding MediaWiki libraries.

Background
A number of developers are hosting libraries as MediaWiki extensions, which creates an additional layer of dependencies for extensions and puts an additional burden on MediaWiki administrators.

Compare the case where libraries are developed (mainly) for an extension by its authors and are shipped with it, but hosted on different repos as the jQuery modules of milkshake hosted at GitHub.

Proposal
Add a  directory for MediaWiki which would hold all PHP libraries. Additionally, libraries would be stably versioned with releases of MediaWiki, so that extension authors could target specific library versions along with specific MediaWiki versions for compatibility. Libraries in the  directory would be submodules, like extensions or skins.

Scope
Some examples of extension libraries:


 * Elastica
 * LdapAuthentication
 * All of the Wikibase extensions