Parent: #792 Implement `replace_conversation()` — atomically replace messages with compacted set. On `load_history()` restore compacted state. Part of M30 epic.