Query API

It's the API you've all been waiting for!  Chain your methods together with abandon!

There are still two test failures in jruby related to raising exceptions for queries.  I think they'll be easy to fix, but I'm curious if things are they way they are for a particular reason, so I was hoping somebody else could take a look.