Add test case for shutdown when active job is reattemptable.

Issue #469.
Fix bug with worker shutdown failing for reattemptable jobs.

Fixes #469