Merging back in with message store and logger.

This PR contains the message_store functionality plus a slightly stripped down version of mongodb_log plus its full history.