[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.).

PHPBB3-13294