Follows-up 847b91b.
Noticed that in Xenon profiles, about 25% of Database::__construct
time is spent in array_map, via DatabaseDomain::convertToString.
* Database::__construct
* DatabaseDomain::__construct/convertToString/array_map
* DatabaseDomain::newUnspecified
* DatabaseDomain::__construct/convertToString/array_map
* DatabaseMysqlBase::open
* mysqli::*
Change-Id: Ib5ae7d1d03b27df504a7e5f552e36a0ca6fcf97e
* Add DatabaseDomain class to handle passing domains around.
It also can be cast to and from strings, which are of the same
format as wfWikiId() except with hyphens escaped.
* Make IDatabase::getDomainID() use these IDs so they can be
passed into LoadBalancer::getConnection() and friends without
breaking on sites with a hyphen in the DB name.
* Add more LBFactory unit tests for domains.
Bug: T145840
Change-Id: Icfed62b251af8cef706a899197c3ccdb730ef4d1