Move message and command serialization to journal.common