Fix compilation of script strings

The right hand side of script string properties can be evaluated in entirely
dynamic scopes, due to QQmlExpressions' public API of allowing construction
from a QQmlScriptString and a variable scope/context. Nevertheless we should
compile these bindings at type compile time, as long as we make sure that the
compiled code doesn't try to do any compile time determined property lookups
and type resolution. This is implemented using a separate compilation pass
that ensures the disableAcceleratedLookups flag is set.

A few minor cleanups come with this patch:

 * Ensure that the property caches array is always symmetric to the list of
   compiled QML objects, as that allows the use of at() instead of value().
 * The code for creating a QML callable function object for a given run-time
   function is now centralized in a static function QmlBindingWrapper, used
   for script strings and bindings from custom parsers.

The provided unit test verifies the successful execution of the same script
string with two different scope objects.

Change-Id: Ica2cea46dd9e47263b4d494d922d3cc9664b08ae
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Fix performance regression for bindings from QtQuick state changes

This is a regression from the compiler change. We can and should try to
use the binding as it was compiled in the loader thread for things like

    PropertyChanges {
        target: foo
        width: someExpresion + to + calculate * width;
    }

It is already ensured that these expressions are compiled without type
optimizations.

Change-Id: Ib855d8a848fcab2524df008727eab436ac98514e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Avoid recompiling of signal handlers defined in QtQuick state changes and Connection objects

We can re-use the expression we've compiled at QML type compilation time, as
long as we "inject" the signal parameters in the dynamic qml lookup chain.

Change-Id: Icc417531c41dea06ff5d033011179af49b03f542
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reduce memory consumption of runtime compiled QML types

Don't store the string of binding scripts in the compiled data. The only
exception to the rule are properties of type QQmlScriptString as well as types
with custom parsers.

Change-Id: I7f53262bf957b442bac4db71d0a2c0bed74a9b54
Reviewed-by: Lars Knoll <lars.knoll@digia.com>