[Wikidata-tech] Removing 3rd party dependencies from WikibaseQueryEngine