Wait for a thread to finish running and cleanup.
This function should always be called prior to PCRThread_Destroy.