Visual query builder

Still working on:

* Docstrings/better variable names
* Precompute compatibility
* Adding a setting to disable pycode altogether
It used to be an angular thing to avoid binding to a primitive, but this should all be gone in the refactor.