When linting via qmllint, the resource files are used to map from source
folders to buildfolders and are needed to load qmldir files from the
build folder, for example.
The linting module of qmlls was not loading qmldir, for example, because
it did not pass the resource folders to the linting method.
This is the reason why qmldir imports, for example, were not working in
qmlls.
Find the resource .qrc files from the build folder and let qmlls pass
them to the linting methods. Also fix the import folders to discover
in-source-directory qmldir files, when no qmldir file was found in the
build folder, in the same way as qmllint does it.
Add some tests for both cases (qmldir in build directory and qmldir in
the source directory).
Fixes: QTBUG-111429
Change-Id: I885c962cac5b1276f12bc28d6d47c43212f853e4
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>