Factor out non-queries

For discussion purposes only.
Please do *NOT* merge.

The idea is described in the comment above the `sendQuery` binding
at line 286.

Once a data constructor is factored out of `Query` it is very easy to
include in a function that creates stand-alone javascript.