Simplify workers_to_wait conditional
Pull poll-links out of wq_wait_internal
Pull receive tasks out of wq_wait_internal
Adds stoptime argument to start/receive tasks
Put start/receive tasks into the policy function
Return count of tasks started/received
Policy skeleton in a do/while loop

This is the last commit that replicates the old work queue behaviour.
Interrupt long sequences of starts/receives
Continue on loop only if timeout has not expired
ascii flow chart explaining the structure of wq_wait_internal
Avoid busy waiting when no task fits in the available workers.
Remove spaces from stats log.

The spaces were there to make the log easier to read on a terminal.
However, there are so many fields that the spaces have the opposite
effect.
Merge pull request #390 from btovar/wq-policy-loop

Wq policy loop
Make sure there are workers before going to transfer_tasks
Fix flowchart to match the code.
Remove MIN comparison
Commit task to worker before transfering it.

This way, if something goes wrong with the transfer, the task is already
registered with the worker and handle_worker_failure re-inserts into the
ready_list.
Return worker failure if failed to send the task completely.
Merge pull request #404 from btovar/wq_policy_fixes

Wq policy fixes
Merge pull request #405 from btovar/lost_task

Commit task and add it to the worker's list of tasks before attempting to send it. This enables failures during the transfer of input files to be caught and cleanly handled.