Behavior fix when creating QML windows

When a QML window is created it is set visible after the QQuickWindowQmlImpl component is complete.
This works fine for a single window, but because componentCompleted is called first for the last
created windows, the behavior is not as the user might expect (and different compared to
version 2.0 of the QML Window API). One of the results is e.g. that a  window which is created
as a child object in QML will have a lower z-Order than the parent. On some platforms (e.g. BlackBerry)
an even bigger problem arises because the first created window acts as a container for
the whole application and is always shown fullscreen. On other platforms (Linux) the initial window
position and the window focus ares not set correctly.

This patch postpones showing windows until the "transientParent" is visible.

[Changelog][QtQuick] Making a QtQuick Window visible is postponed till its transient parent is visible

Task-number: QTBUG-37440

Change-Id: I09a94ff038c066a5d3298c6c103dafde50bef1fa
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Finish QML test cases after waiting for deletion

Otherwise messages triggered by the waiting (and the event loop that's
run in QTest::qWait()) won't be correctly attributed to the test
function being run.

Task-number: QTBUG-37609
Change-Id: Iccc13d8caa021fc26fbf76da0056cb0dd870ec0e
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>