The sanitizer features with CMake were relying the the Extra CMake
Modules from the KDE project. It used to check compatibility with the
compiler version for GCC and Clang, and add the appropriated flags to
the CMAKE_C|CXX_FLAGS. It has several limitations:
- It only supports GCC and Clang, and fails with another compiler.
- It supports a finite number of sanitizers, and fails if unknown ones are used.
- Since it uses the CFLAGS and CXXFLAGS, it messes up with the fuzzer sanitizer which tries to link everything to it's own functions.
This diff replaces these features with a custom file. This is a mixup
between the autotools equivalent check and the ECM features, i.e. it
checks that the -fsanitize flag is supported both for compilation and
linking, and adds the appropriated flags for better sanitizer
efficiency. It does not use the CFLAGS or CXXFLAGS but target
properties to attach the flags, allowing for the use of the fuzzer
sanitizer as well (need the proper definitions to build, will be added