DB: use _dict_query_where_clause in find_jobs

Now also use this function to prepare the query for the job
table parameters.  This is so that we can handle the range of
options which it supports.