MDL-48157 testing: Messagesink should utilise the full message stack

The Unit Test framework should cater to catching both messages, and mails
in sinks simultaneously, but at present, if the message sink is enabled,
then the mail sink is skipped.

This was caused by a shortcut placed into the message handling code which
skipped all of the message processing and placed the message straight into
the message_read table without subsequent processing taking place.

Fixing this issue revealed a number of underlying issues in some unit
tests.