Replace `sleep` with `condition_variable` synchronization to ensure the child
PID is captured before attempting to kill it. This eliminates timing
dependencies.
The issue was that in three tests, the `Args` arrays were being declared inside
for loops.
When `TQ.addTask()` was called, it stored a pointer to the `Args` array. As the
`Args` array was declared in the loop, it would go out of scope at the end of
each iteration whilst `TaskQueue` held a pointer to it.