Minor consistency fixes

 - return (CONTINUE); now always uses brackets
 - Open brace in an if block on own line
 - Remove extraneous semi-colon
Update to use ZNC's tokensiser to analyse outgoing messages
Refactor message storage to common points
Minor effiency fix on replay iteration