Various dependency injection cleanups to LoadBalancer
* Inject wfWikiID() and MWExceptionHandler into LoadBalancer.
* Factor out LBFactory duplication into baseLoadBalancerParams().
* Remove $wgDBtype hack. Presumably, sites with others DBs would
not have multiple servers configured if does not work anyway.
* Make use of injected TransactionProfiler rather than calling
Profiler::instance()->getTransactionProfiler().
* Avoid use of trivial wfSplitWikiID() function.
* Make DBConnRef enforce its arguments more strongly and
optimize getWiki() to avoid causing a connection attempt.
* Avoid deprecated method call in LBFactory::destroyInstance().
Change-Id: If134b62d4f48cd68cb48ccbe149e72f12aa26819