DB: find_jobs now filters output files in SQL

Because GROUP_CONCAT has a maximum length (which isn't an option
to the function) the previous method of selecting all the output
files and filtering them in Python could enounter problems when
there were a large number of files present.  The routine no
longer accepts just True as an argument (although the same thing
can be accomplished by specifying "%" as the pattern) as it is
known not to be reliable.  The code has also been simplified a
bit, e.g. we no longer need the filtering Python code, and
the SQL simply selects NULL if output files are not requested
so that the results contain a consistent number of columns.