Deduplicate extension resources in HTML output
When a page uses the same extension multiple times (e.g., multiple
mermaid diagrams), the extension's resources (JS/CSS) were being
included once per use. This caused duplicate script and stylesheet
tags in the HTML output.
Add a deduplicate_resources helper that removes duplicates while
preserving order (keeping first occurrence) before rendering
resources to HTML.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>