Add hash function and tests for the Message struct