QDoc: Lift sort-order parsing into QDocLib
The sort directive on \generatelist and \annotatedlist is parsed
by a small helper that lives next to the legacy generators. Code
on the QDocLib side cannot reach for that helper without pulling
in the driver layer QDocLib is deliberately insulated from, so
any QDocLib pass that needs to recognize the same directive has
to either re-parse it locally or smuggle the parser across the
boundary.
The directive parser now lives where any layer can use it. The
legacy generators see no behavior change, and QDocLib code that
needs to interpret the same directive can do so without crossing
the boundary.
Task-number: QTBUG-146596
Change-Id: I771be63f5766280c97598bdf93c2fad6db56e87b
Reviewed-by: Topi Reinio <topi.reinio@qt.io>