Atomically delete claim for a work unit.

Attempt to avoid a race condition by adding atomic deletes to Ordasity
when shutting down work units.

Includes fixes for unit tests which caused sporadic failures (depended
on sequencing of external thread - replaced with a Mock).
Merge pull request #31 from pkwarren/atomic_delete_v2

Atomically delete claim for a work unit.