Port to c++ and use new APIs.
Did change the code much, but it's now compiled as c++
- Move the lib/query/ stuff up a level into lib/ - Associate directly with the Query object - Rework the Query object to be C++ rather than mixed with C - Update all dependencies, tests