use global app instance in tests

this fixes segfaults when trying to initialise
QApplication several times