[ticket/12994] Add core event to viewtopic.php before sending vars to template

Add core event to viewtopic.php before sending vars to template
to allow extensions performing additional actions/modifying data first.

PHPBB3-12994
Merge pull request #2889 from rxu/ticket/12994

[ticket/12994] Add core event to viewtopic.php before sending vars to template