Implement syntax checking for C/C++ using Clang

This includes both the cppcheck patch as well as the Clang patch so that both can be applied cleanly to the tree.