Reduce dependencies on QQmlValueType being a QObject

Don't rely on caching the property cache in the QQmlData of the value type,
instead we can cache is in the engine and store it in our object data.

Change-Id: I5f31313c066cd7918caf33e3fabdf5aac71f1adb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Move methodParameterTypes and methodReturnType helper functions

These can extract the type information from either a property cache (through
QQmlData from a QObject) or (fallback) from a QMetaObject.  The difference
between a QMetaObject and a QQmlPropertyCache is what QQmlMetaObject abstracts
and therefore we can move the functions there.  This is in preparation for
gadget support and also avoids the repeated QQmlData::get() dance but allows
the re-use of a QQmlMetaObject instance in the future to do that dance only
once.

Change-Id: Ibff6ce498d09fabc97e0801653edc5b1ff446c6a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Prepare method invocation in QObject bindings for gadget support

In order to support calling invokable methods in gadgets from JavaScript, the
wrapper code needs to be able to operate on gadgets and not only QObject
pointers. The minimal abstraction for that - QQmlGadgetOrObject - is passed
through the relevant invocation methods in the wrapper for that.

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