QtQuick test: Do not complain about Qt specific arguments

Commit 1ca5e82cccae0 caused a regression for Qt arguments like
-qmlsjsdebugger=xxx . These are automatically removed from argv by
QCoreApplication, but since we copied argv before instantiating
QCoreApplication this didn't have any effect.

Fix this by moving Q[Core]Application instantiation again before
the parsing and copying of testlib-specific arguments.

Task-number: QTBUG-37793
Change-Id: Ief41640b6cf3251f700a5d24d2e1141233a3888f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Use RAII for VME profiler

Now that object creation is done in nested function calls we can
use an RAII-type profiler to trace it. This makes the profiling
much simpler and more robust.

Also, the stack of profiling data in the VME profiler has to match
the stack of completion callbacks in the VME, so the push and pop
operations are synchronized now.

Task-number: QTBUG-37978
Change-Id: I1bc5e0665b88e5b3772e48c8676cdda3fae59e1b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>