[CMake] Improve module / dependency system
The current build system is implemented in CMake and was designed to replace the former system based on Autotools. Especially the modules, variable passing, and dependency handling is bad, as every module has to re-run the tests from all direct and indirect dependencys