Use new CMake macros for Qt 5 dependencies

This is way easier than using the old variables.
Force dependency on Solid >= 5.0.0

This might help to find the right Solid version.
Exclude tests from being built if CMAKE_BUILD_TESTS is OFF

This makes the build system flexible.