QDoc: Harden IR serialization and ContentBuilder for real-world input


The template generator's IR layer assumed structural invariants
that real-world Qt documentation doesn't always satisfy. Some atom
chains produce blocks with both inline content and children, table
rows with no cells, and container inlines with empty child lists.
These cases caused assert failures and Inja render errors when
templates accessed missing JSON fields.

IR serialization now always emits children, rows, cells, and text
fields so templates can safely iterate without existence checks.
ContentBuilder recovers from malformed atom chains by cleaning up
state rather than terminating the process.

Task-number: QTBUG-143355
Change-Id: If35d5e50617e4a2745e70717361c11d85fa6b052
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
commit1e4f343a6866b72c3732fed57f78dbd7678ff432
parent48abd48109423882c7bf274b2a8d2568eefafbef
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeWed, 25 Mar 2026 13:20:10 +0100