Make entity change hooks usable by Wikibase Query

Change-Id: I2308ac71fa9de82cccb5d270484e0e4834487eda
Merge "Make entity change hooks usable by Wikibase Query"