Implement layer tree and damage tracking for minimal repaints
Add a retained layer tree system that tracks layout box state between frames
and computes damage rectangles for partial repainting. The system compares
box fingerprints (position, color, opacity, text content, borders) across
frames to identify which screen regions changed, merges nearby damage rects
to reduce draw calls, and skips rendering entirely when nothing changed.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>