Expose QTest::currentAppName() and remove hard-coded argv[0] in tests

Except where we're actually testing QCoreApplication::applicationName()
and friends.

Based on a3530859e9a7423db0b6839f15538f248aaf4a79

Change-Id: I36ef8cbb5d8bce45225a7f81409f46f1d584287b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>