QDoc: Track atom chain traversal state with AtomContext
When converting atom chains to structured content blocks,
i`ContentBuilder` must know where it is in the document tree: inside
a list, a code block, an admonition, or any nested combination. The
existing `HtmlGenerator` solves this with scattered boolean flags that
break down for arbitrarily nested structures.
`AtomContext` replaces those flags with an explicit stack of typed
frames. Each frame records the context type and optional attributes,
and ancestor queries let `ContentBuilder` ask "am I inside a list?"
regardless of nesting depth. The stack naturally tracks correct
closing order for arbitrarily deep nesting.
Fixes: QTBUG-144239
Change-Id: I2ad84f5fe97a7623201712d3fce2bcad530158b9
Reviewed-by: Topi Reinio <topi.reinio@qt.io>