Test and fix for bug #1693 to ensure thread_specific_ptr::release works as desired imported from trunk changeset 43666