[ticket/13294] Add function parse() core event for additional message checks

Add core event to the function parse() in includes/message_parser.php to allow
additional handling message before parsing (i.e. perform custom message checks,
cleanup etc.).

<a href="https://tracker.phpbb.com/browse/PHPBB3-13294">PHPBB3-13294</a>.