implement API for queries via GET (Fixes #350)

Make output path optional when executing queries. If not specified,
the evaluator simply leaves a result temporary collection in place.

Added a TODO on cleaning up these temporary collections.
Yes, that's the idea, and it's using `onComplete` to attach this process to the scan process (see line 80). There didn't seem to be an easier way to do this, but I could be missing something.