pipeline_utils: add get_grouping_lists function.

This function receives the current outputs of the previous stage and the outputs
of the newly finished task.  Based on these inputs, it produces two lists.
1. The list of new output groups which should be consumed by a new task.
2. The list of modified ouputs groups which should be transmitted to the worker
task for consumption.
job_coordinator: extract the maybe_submit_tasks function out of task_complete.
pipeline_utils: return an empty list for all types of groupings.