Add .clang-tidy and enable higher warning level
The number of checks that we can use is highly limited since this is a C project, not C++ and we have to do a few things that are UB strictly speaking (like void * <-> function pointer casts), but there are a few things we can enable that are still useful. Examples:
- readability-identifier-naming
- readability-redundant-control-flow
- readability-else-after-return
- misc-definitions-in-headers
- Most of clang Static Analyzer
-Wall -Wextra(-Wpedantictriggers on our unsafe pointer casts that are mandated by the OpenCL API)
Note that this requires the generation of a compilation database which is most easily achieved by passing -DCMAKE_EXPORT_COMPILE_COMMANDS=ON to CMake >= 3.4. This shouldn't be much of a problem, as the way I set up the testing matrix in #65 makes it easy to switch out different build tools for different jobs in the matrix (just add another Conan profile). This way we can use this feature on our CI and still ensure that the project builds correctly with older CMake versions.