Fix bug idle workers not timing out.

The timeout stoptime was reset every time there was a message from the
master. This came because we were testing for the timeout in two
different places, and using both store and active tasks. This commit
consolidates reseting the timeout at the end of the function, and
making the comparison to the timeout stoptime the only condition to
abort on idle.
Reset timeout when there are waiting tasks
Merge pull request #388 from btovar/worker_timeout

Fix bug idle workers not timing out.