Add a makefile for clang-query. Patch by Alex Horn!

While at it, have cmake build and test the tool if libedit is not installed,
as this dependency is now optional.