The wikidata bridge should be configurable to use links pointing to different repo instances other than wikidata.org.
In JavaScript, this should be exported somewhere in `mw.config`, under a “data bridge”-specific name; for now, we only need to support a single repo here, though in general a client can be connected to more than one repo. The value could be either a regex matching the href, or an object containing that regex and also an `api.php` URL.
In PHP, this should ideally work “out of the box” based on the information the client already has about the repo, though it might also be useful to be able to override this via `LocalSettings.php` (somewhere in `$wgWBClientSettings`, presumably).
---
#patch-for-review: there are two independent chains implementing this, with different approaches. Either one can be merged. (Ignore all of @gerritbot’s comments below, due to change renames and abandonments they’ll just be very confusing.)
- [ ] add setting in `BeforePageDisplayHandler`, where the module is also loaded
- [ ] [add and read setting (still hard-coded in PHP)](https://gerrit.wikimedia.org/r/519256)
- [ ] [add config for PHP side](https://gerrit.wikimedia.org/r/519392)
- [ ] add setting as separate ResourceLoader module, and load this and the init module only if data bridge is enabled
- [ ] [only load init module if data bridge enabled](https://gerrit.wikimedia.org/r/519654)
- [ ] [move auxiliary class from repo to lib so we can use it](https://gerrit.wikimedia.org/r/519655)
- [ ] [add and read setting module (still hard-coded in PHP)](https://gerrit.wikimedia.org/r/519425)
- [ ] add config for PHP side (TODO)