Fix return type checks in test.

When calling into JavaScript, the specific type of the return value can
differ if that return value is a number. This is not only the case for
non-integral numbers, or numbers that do not fit into the (signed)
integer range, but it also depends on which optimizations are run. to
check if the return value is of a number type, use this method instead
of checking against a specific userType.

Change-Id: I0464c062bd617c83b7a1e887f7853aa5cd8f43e4
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
V4: temporarilly disable the optmizer/regalloc.

There are two bugs for which patches are pending. In order to unblock
qtquickcontrols, this code is disabled until those pending patches are
merged.

Change-Id: I2362bf3db0614ef8c6f45a1506838f227ea17b59
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>