Improve citation handling and link sanitization
Enhances citation mapping and normalization to avoid duplicate system messages and properly mask code segments. Refines URL extraction and normalization, improves link sanitization in markdown rendering, and updates citation rendering logic to use safe href attributes. Also fixes message content updates to preserve initial content during streaming.