Merging MediaWiki codebase

This is my 2nd take at merging the upstream code of MediaWiki.

Basically, it reintroduces all the removed files, in order that bit-by-bit this branch can be updated to the latest version (merging each minor version as we go).