Print foreman's debug messages every 10 seconds.
Keep a list of workers with available results.
Master wait for results on workers with available results.
Send a single available_results message.
Add tasks finished to list of results to send back.
worker and foreman sends completed tasks on "send_results n"

Where n is the maximum number of results to send back. n == -1 means
send all
Do not send resource updates until master reads results.
Remove constant from debug and resources intervals.
Change results_to_be_sent from a list to a table
Do not send result if task is killed by the master.
Merge pull request #291 from btovar/wq_deadlocks_2

Modified protocol for the transfer of task stdout from worker to prevent deadlock in the master-foreman interactions when both are streaming data:
1. Workers do not send results immediately, now they send a message "available_results".
2. When master sees "available_results", it pushes the worker into a list.
3. Eventually, the master goes through that list, sending "send_results n" to the respective workers, and waits for the workers (one by one) to respond. n is the maximum number of results to send. n == -1 means send all.
4. workers respond with at most n result messages, and a final "end" message.