[ticket/12928] core.mcp_reports_gather_query_before

Adding the core.mcp_reports_gather_query_before
event to mcp backend.

https://tracker.phpbb.com/browse/PHPBB3-12928

PHPBB3-12928
Should we make this an array instead and use sql_build_query() instead?