tests/tools.py: Avoid fragile decode from check_cmd
Fix for clang 3.5

Lots of #ifdefs in libclang plus a few extensions to configure.py.

libclang synced from https://github.com/xdress/clang/commit/327334508384df920699cd76807daf9ec5c4bee1.
Suppress error if llvm-config --system-libs doesn't work