[ticket/13059] Add core event to generate_page_link()

Add core event to generate_page_link() to allow overriding/modifying pagination URLs.
Event request: http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=45905

<a href="http://area51.phpbb.com/phpBB/viewtopic.php?f=111&t=45905">PHPBB3-13059</a>.
It doesn't work as in this case error is thrown that the object is not an instance of \phpbb\event\dispatcher.