(PDB-1011) Allow querying of PDB directly via a TK service

This commit adds a function to the PuppetDBServer service to execute a
query and return the results as a Clojure data structure (rather than
streaming JSON over HTTP). A function can be passed in that will accept
a lazy seq to consume the rows
if I comment out this line up to with-puppet-db-instance I get a casting error when the facts are queried:
 java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.IPending