QtQml: Record export versions in qmldir
So far, the VERSION attribute of qt_add_qml_module is only recorded by
qmltyperegistrar in the generated C++ file. If you don't generate a C++
file, it's lost. It's also not available to downstream tooling like
qmlcachegen. The same holds for PAST_MAJOR_VERSION.
Record the versions in the qmldir as a new "export" entry instead.
Pick-to: 6.12 6.8
Task-number: QTBUG-147814
Change-Id: I986d14eaa9a21901bb67c7bb167be2f545eca1ff
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>