[new compiler] Cleanup empty string handling

Ensure that the empty string always has index 0, that simplifies the code in a
few places and makes it easier to check for the empty string in other places
where there's no access to the string pool itself.

Change-Id: Icd204aec478e8350ef3fee75d89bda1f88cffe26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix binding initialization order

Since commit 3d958cec8d53094a1bbab895377e451b07716e1f (loong time ago!)
property bindings are stored in a linked list and newly encounted bindings
at parse time are prepended to the list, causing the binding processing to
happen in reverse order.

There are however exception to the rule. For example list bindings are processed
in declaration order and assignments to the default property are sorted by
location in the file.

In addition various tests rely on value properties being installed first, then
followed by signal handlers and group/attached properties.

Change-Id: I3bcae29faec5b2420fbba362cd81b8ba960ed19f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix JS ownership of QML created objects

It's allowed to call destroy() on them, so allow for destruction
unless the constructor set ownership upfront.

Change-Id: I3887c5ab1bb6de7de3b0c7b14f4791d4ed1e0979
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Set the rootObjectInCreation flag correctly on the root object

Change-Id: Iaf96dabb1b3de81aae75953fd261dfc3b562169c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix bindings on aliases

When installing bindings on aliases, make sure to follow the alias.

Change-Id: I860a5bf6b5aba838727385f26e50e3d1bf0c8ea8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix order of alias vs non-alias bindings

qqmlecmascript's alias binding tests expect bindings on non-aliases to be bound
before bindings on aliases, as the latter may override parts of the former.

Change-Id: I23d25c2b7a449f0ed4672ef6865c4a7ef0ed0129
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
[new compiler] Fix partial bindings on value types

You can have a binding like this:

    property point blah: Qt.point(someX, someY);

and later you can have bindings on

    blah.x: { someExpression }

In that case we need to clear the binding on blah.

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