QDoc: Clean up whitespace noise in template output


Template control flow produces extra blank lines in rendered output,
causing documentation pages to accumulate whitespace between elements.
This makes both HTML and Markdown output look unpolished.

The template engine now strips whitespace artifacts from control flow
automatically. Intentional blank lines in templates are preserved.
The Markdown page template is adjusted so that horizontal rules aren't
misinterpreted as headings.

Task-number: QTBUG-144245
Change-Id: Ic7545ffe98a0c1e7ef545b65719a60efad7630b3
Reviewed-by: Topi Reinio <topi.reinio@qt.io>
Reviewed-by: David Boddie <david.boddie@qt.io>
commit891a2b3d10ecac5f7ef9f3b9abcd6454528d94be
parentaf3c47ca1487c8580280a8648f5656075fd56454
authorPaul Wicking <paul.wicking@qt.io>
committerPaul Wicking <paul.wicking@qt.io>
commit timeMon, 23 Feb 2026 19:41:09 +0100