[new compiler] Fix some qqmlincubator tests

We need to track the objects created and pass them over to the VME guard used in the
incubator. The incremental build nature of the incubator requires that to avoid crashes.

For nested incubators we need to set the activeVMEData field in the root QQmlContext, to allow
child incubators to locate the parent.

Lastly we need can emulate most of the VME behavior in terms of build states when running with
QQmlInstantiationInterrupt by presenting four build steps: The initial state, two build steps,
a finalization step and the state when we're done.

Change-Id: I16cd7f71744decb9d4735ec77e9d944fad18e88d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix profiler support

Add profiler tracing calls during objection creation and make sure to set the
function token / source location correctly for the synthesized function
declarations of signal handlers.

Change-Id: Ie4f8accce3a5c5d1d57bb0646cda588b89b76718
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Combine the source file, line and column number triplet in a common structure

This avoids unnecessary function calls when all of the three pieces need
to be retrieved from a QQmlBoundSignalExpression.

Change-Id: Ibcd498c907ea723baf6439cf32ca5fc704f204b5
Reviewed-by: Ulf Hermann <ulf.hermann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix crash when accessing var properties in objects with invalid context

We've had two indepedent reports of people running into the issue of
their QML code accidentally trying to access var properties in item view
delegates that were on the path of destruction, i.e. their QQmlContext was
already marked as invalid. Any such access would cause a failing assertion
in debug builds or a crash in release builds.

This patch removes the dependency to QQmlContextData for accessing the
var properties and adds a test-case that covers this use-case.

This is a regression from Qt 5.1.x.

Task-number: QTBUG-37227
Change-Id: Icf55d5fa8c15e45974e78086e9e11b2401ea9bad
Reviewed-by: Albert Astals Cid <albert.astals@canonical.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>