Context Codec: Rate-Distortion Optimization for Persistent LLM State | Synapse