Visual query builder

Still working on:

* Docstrings/better variable names
* Precompute compatibility
* Adding a setting to disable pycode altogether
I can't think of a case where it would be false, but I don't remember why I put that in.