Add Qt5 support
Fix some race condition segfaults of tests on exit
Formatting of tests
Return non-zero status from cmake script when build or test fails