Added a very rudimentary function generator for queries.

This will be implemented properly in cqlengine in the near future.