Add option to call worker doTask() method on stop request.
Sort tests.
Add tests for doTask()-on-stop option.