Fix interaction of garbage collector with JS objects during QML type instantiation

It may happen that during the lengthy process of instantiating a tree of
objects for QML, the garbage collector runs.

For objects created by QML we support different ownership models, for example
in QtQuick visual parents keep their visual children alive, despite perhaps a
lack of QObject parentship. That ownership becomes active once the QML
autoparent function has assigned the correct visual parent, which happens after
object instantiation (after QQmlObjectCreator).

Similarly when a composite type is created, its QObject parent is only set
after all properties have been set. The root QObject is kept alive through a
special boolean, but if the sub-objects aren't children yet, their JS wrapper
might get deleted. For composite types with var properties, that also means
their var properties get deleted, such as the model property of TableView.qml
in the bug report.

In the future we want to support creating QWidget hierarchies with QML, which
also for layouts may rely on a delayed parent assignment for layouts.

To accommodate all this, this patch introduces an array on the JS stack that
keeps track of all JS wrappers for all QObjects created. This array is alive
during object tree creation. Afterwards, the different ownership models take
over, for example the auto parent function assigning a visual parent.

This patch also fixes an off-by-one in the total object count calculation
for composite types, where when instantiating a composite type as a sub-object
we counted the sub composite's object count but forgot the object itself.

Task-number: QTBUG-38835
Task-number: QTBUG-39966
Change-Id: I6104b2434510642081e0c54793ed296adeca7481
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QQuickMouseArea: Mark override functions with Q_DECL_OVERRIDE

Change-Id: I6fb5fd48a24affc463c5eb7ea0e80c81fab33f66
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
 Don't try to draw shader effect sources with dims < 0.

Task-number: QTBUG-40099
Change-Id: I0eb0d877963a9394765ec8e0f10569a98a263743
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Flickable: Cancel interaction on interactive changes

Otherwise if you have a listview with a flickable inside with a mouseare inside
the pressed is never set to false if you make the interactive property of the
outer list depend on the moving of the inner flickable. This makes that when
later you change currentIndex of the list and you have
StrictlyEnforceRange set, the list won't move because it still thinks it is pressed

Change-Id: I2c2021f486fc0a31840c3f2199bc7cb76dc01e3e
Reviewed-by: Martin Jones <martin.jones@jollamobile.com>
Don't dereference null pointer.

Task-number: QTBUG-40448
Change-Id: I75eb886ae765191101d6b01ebd038211e5fe8fba
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Remove metaobject revisioning for QQuickScreenAttached

Attached property versioning is not currently fully supported. Initial
approach was to add the version tags and not enforce them until you
could version attached properties. However the QML engine is currently
erroring on this. Specific error example:
""Screen.onNameChanged" is not available due to component versioning "

Workaround recommended in the JIRA task is to just not version them,
until attached property versioning is fully implemented.

Task-number: QTBUG-35569
Change-Id: I5ded7eb223ec00f70d847b3fac09ec240d5d7901
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Merge remote-tracking branch 'origin/5.3' into dev

Change-Id: Id95f7b01de36bccecbb7b73acc041654a1fe2ebe
Merge "Merge remote-tracking branch 'origin/5.3' into dev" into refs/staging/dev