[DDC-2816] Adds a preQueryExecute event

Adds a new useful event, allowing to modify every query just before execution.