Implement QObject ownership policy for QObject JavaScript wrappers

A parent with C++ ownership keeps its children alive. We know that all
QObject wrappers are kept in a QWeakValue inside the QObject's QQmlData.
As the weak values are registered to the MM, we can traverse there and
mark the children if necessary in one extra pass.

The handleReferenceManagement auto-test that covers this was actually
testing the addGCRelationship implementation as well as the overal behavior.
Some of the tests verify that a handle based overload of addGCRelationship
works, so since those tests don't make sense anymore, I've removed them.

Also fixed some cases where the test ran gc(engine) when it should've called
gc() on the specific local QQmlEngine instance used in the test. This worked
in V8 because the GC was "global".

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