QDoc: Build link containers from atom chain
Documentation links come in two forms: auto-links where the type name
itself is the display text, and explicit links where a separate display
text follows the link target atom. Both need to produce structured
Link inlines in the content model, with display text as children.
Explicit links use a state machine to track when the builder is inside
a link container. The Link atom opens the container and consumes the
trailing FormattingLeft("link") atom that QDoc's parser always emits.
The matching FormattingRight("link") closes the container and resets
the link state. Block closure also cleans up orphaned link state as
a safety measure against malformed atom chains.
Task-number: QTBUG-144240
Change-Id: I3fade0a5d1ca81edcd34b8478dd92da5d72335f5
Reviewed-by: Topi Reinio <topi.reinio@qt.io>