Clean up after the multithreaded test case finishes.

Patch by Sean Callanan.
<rdar://problem/18140875>