[WIP] Clean up database interaction and migrate to Wikimedia Labs

Major changes:

* Clear out all Toolserver stuff.

* Drop "Main connection" concept and instead only use
  named connections.

* kfLog no longer takes a $current parameter, use kfLogStart()
  and kgLogEnd() to group information for profiling and logging.

Removed:

* Constant KR_KEEP_PRIM_DBCON.
* Constant KR_SET_AS_PRIM_DBCON.
* Method GlobalConfig::getAllDbConnects.
* Method GlobalConfig::getDbConnect.
* Method GlobalConfig::getDbExtraConnect.
* Method GlobalConfig::getRunlog.
* Method GlobalConfig::getRunlogFlushCount.
* Method GlobalConfig::setDbConnect.
* Method GlobalConfig::setDbExtraConnect.
* Method GlobalConfig::setRunlog.
* Method GlobalConfig::setRunlogFlushCount.
* Function mysql_object_all.
* Function kfCloseAllConnections.
* Function kfConnectRRServerByDBName.
* Function kfConnectRRServerByHostname.
* Function kfConnectToAllWikiDbServers.
* Function kfDoSelectQueryRaw.
* Function kfGetAllWikiSelect.