Allow populate sites table to work without wikibase enabled

* note: this really needs to be moved to core or somewhere
outside of Wikibase!

Change-Id: I17a952e6e1a0b6d9fd8f8961614b0331ffb42fa0
Merge "Allow populate sites table to work without wikibase enabled" into mw1.23-wmf6