fix leaking mgmt context, and logging for the cause of it
better concurrency control, fixing very rare but observed once error on DSTask.cancel wrt primaryThread becoming null
better logging during tests, making it easier to see what is going on
tidy log message (from code review)
Merge pull request #909 from ahgittin/fix/misc

misc tidies for logging and tests