QtQml: Look for AOT lookup signature imports in dependencies
A document can do lookups on a type it doesn't name, and whose module it
may not even import. It may get hold of the type via a property of a
type defined in a different document. The compiler then records the
import that other document has. The validator only looked at the imports
of the document itself, failed to find that import, and rejected a
valid compilation unit.
Also search the imports of the compilation units the compilation unit
depends on.
Pick-to: 6.12
Task-number: QTBUG-150967
Change-Id: I694913c8b2c8cfe39325187667732008b04e6a7b
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>