Port to ecm_add_test to actually run the tetsts
Requiring at least ECM 5.38 comes with a different build dir layout to help testing of not installed apps. But in combination with the old add_test syntax ctest can't find the test executables and thus can't run the tests. Using ecm_add_test fixes that.
Also remove some settings already set in the root CMakeLists and remove some Qt5 things.
Furthermore require passing tests for gitlab so things like this are more easily noticeable on CI.
(cherry picked from commit 3ae0a910)