AutoGen: query Qt5 version from directory properties
This allows functions which enable AutoGen to make the version variables available at generate time.
See: #18732 (closed)
Will add tests if this looks OK.
Cc: @brad.king Will have a separate MR for master
since its code has changed (and supports Qt6).