Helper method to create a message object from its independent pieces.
function createMessage(identities, header, parentHeader, metadata, content) {
  return {
    identities: identities,
    header: header,
    parentHeader: parentHeader,
    metadata: metadata,
    content: content
  };
}