odoc: link mode and jkind names when --mode-links is set
When mode_links is configured, mode names (local, portable, etc.)
and jkind names (value_or_null, float64, etc.) are rendered as
hyperlinks to URI#name. The @ and @@ keywords remain unlinked.
Implementation approach:
- Add O.mode tag in document layer (codefmt.ml) to mark mode/jkind
names with a "mode" source tag
- Update all mode rendering sites in generator.ml: arrow arg/ret
modes, Poly jkind quantifiers, type param jkinds, and value
modalities
- In HTML renderer, detect "mode" tags and emit <a> with
class="mode-link" when mode_links config is set, otherwise
render as <span class="mode">
- Refactor format_params to return Codefmt.t instead of string
to support tagged jkind names in type parameters
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>