QDoc: Extract shared anchor ID computation utility
Both XmlGenerator::refForNode() and HrefResolver::anchorForNode()
implement identical node-type dispatch logic to compute anchor
fragment identifiers for documentation members. When extracting
member detail data into the IR pipeline, the same computation is
needed from NodeExtractor without depending on either generator.
A new anchorid.h header declares computeAnchorId() as a standalone
internal utility for the shared node-type dispatch. Each caller
applies its own cleanup afterward: HrefResolver uses cleanRefFn
from its configuration, XmlGenerator runs registerRef() for
collision handling. This keeps the helper generator-agnostic and
preserves HrefResolver's caller-provided normalization strategy.
Fixes: QTBUG-145126
Change-Id: I4820c25b33be119d1bb2c53d25ef6246a1344b38
Reviewed-by: Topi Reinio <topi.reinio@qt.io>