doc: fix a typo in dataflow
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.
jc_utils: introduce running_tasks function.

This function returns the list of the running tasks in a certain stage.
disco.erl: introduce the enum/2 helper function.

This function is just like enum/1 but can start sequencing from any number (not
just 0).
disco_worker: use the update function instead of directly sending inputs to the worker.

When the worker_runtime decides that it should not respond to an input message
immediately, the disco_worker can avoid consuming that INPUT message from the
worker and keep it pending.

That means, when the input is ready, disco_worker can just call the update
functio.  The INPUT message is going to be consumed but this time, there are
some inputs available which will bee sent to the worker.
worker_input: implement the add_inputs function.

In the current implementation, the inputs received by worker_input may contain
duplicates and have to be taken care of.  Moreover, the sequence numbers given
to the inputs are important.  Disco should give brand new sequence numbers to
the new inputs.
job_coordinator: implement the send_outputs_to_consumers function.
job_coordinator: Do not start the next stage in do_next_stage.

In the concurrent model, the next stage should be started when there is some
inputs for it to consume.
job_coordinator: move the logic of of whether the task has all of the inputs to JC.
job_coordinator: if all of the deps of a stage have finished, it can finish.
job_coordinator: update the task_spec when there is new inputs or input is done.
job_coordinator: extract the add_inputs_to_data_map function.
job_coordinator: add inputs to the data_map as soon as they are available.

These inputs will be looked up in the future if the task fails for some reason.
The input ids should already be in the task_spec.
fix the send_termination_signal to avoid using out of date tasks.
job_coordinator: fix the type of inputs.
job_coordinator: Start the next stage if there are no inputs available.

If there are no inputs available for the next stage, that means there will be no
tasks and we cannot delegate the responsibility of finishing the stage to the
tasks.
job_coordinator: maintain a per-stage group_map gbtree.

This gb_tree is used to lookup the tasks based on their inputs.  We have to
maintain a per-stage gb_tree to avoid assigning the inputs to tasks of the wrong
stages.