Include Wikibase query config only if those components are enabled

currently we get php notice:

PHP Notice:  Use of undefined constant WB_NS_QUERY - assumed 'WB_NS_QUERY' in /srv/mediawiki/wikidata_repo_requires.php on line 70

Change-Id: Ie2d56faae8b7ac6467fb51a5387000458127d342
Merge "Include Wikibase query config only if those components are enabled" into production