[ticket/12943] Add core.phpbb_generate_debug_output core event

Add core.phpbb_generate_debug_output core event to allow extensions
outputting additional debug info.

<a href="https://tracker.phpbb.com/browse/PHPBB3-12943">PHPBB3-12943</a>.
Please inject instead of usign global