This also supports importing a module with a qualifier.
Previously, the global "constructors" was used, which is overwritten as
the imports of each component file are loaded.
This repurposes the previously unused "perContextConstructors". This has
been renamed to "perImportContextConstructors", since the modules that
are available to a QMLContext are not necessarily the same as the other
variables that are available.
This adds an "importContextId" property to both QMLComponent and
QMLContext.
"importContextId" is set to a unique value on a QMLComponent if it has
imports, and the constructors found for those imports are then stored in
"perImportContextConstructors", keyed by the "importContextId" and module
qualifier, if there is one.
"importContextId" is then forwarded to the QMLContext that is passed into
the root object that is created for the QMLComponent, so that it is
accessible to any further "construct" calls made.
"importContextId" is also overwritten on the "componentScope" that is
passed into "applyProperties", as we want any children that are created
to use the constructors for the Component they are defined within, not
the Component they are a child of.
PR-URL: #239
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>