MDL-36941 core_message: updated the messaging code to use a single message table
MDL-36941 core_message: added some basic unit tests for messaging