Fix prof regressions.
Fix prof regressions.

Fix prof regressions related to tdata (main per thread profiling data
structure) destruction:
- Deadlock.  The fix for this was intended to be part of
  20c31deaae38ed9aa4fe169ed65e0c45cd542955 (Test prof.reset mallctl and
  fix numerous discovered bugs.) but the fix was left incomplete.
- Destruction race.  Detaching tdata just prior to destruction without
  holding the tdatas lock made it possible for another thread to destroy
  the tdata out from under the thread that was on its way to doing so.

Dmitry-Me/jemalloc,jemalloc/jemalloc-cmake,jemalloc/jemalloc-cmake,wqfish/jemalloc,lvfeng1130/jemalloc,lvfeng1130/jemalloc,lilothar/jemalloc,8l/jemalloc,VRToxin/android_external_jemalloc,vashstorm/jemalloc,lilothar/jemalloc,wespelee/jemalloc,leebaok/jemalloc-4.2.1-readcode,tempbottle/jemalloc,ahmetmircik/jemalloc,jemalloc/jemalloc-cmake,geekboxzone/mmallow_external_jemalloc,Snaipe/jemalloc,glandium/jemalloc,garoose/jemalloc,Dmitry-Me/jemalloc,vashstorm/jemalloc,shekkbuilder/jemalloc,wqfish/jemalloc,leebaok/jemalloc-4.2.1-readcode,VRToxin/android_external_jemalloc,wespelee/jemalloc,dxq-git/jemalloc,wqfish/jemalloc,cpeterso/jemalloc,CMRemix/android_external_jemalloc,leebaok/jemalloc-4.2.1-readcode,AndroidExternal/jemalloc,8l/jemalloc,tempbottle/jemalloc,dxq-git/jemalloc,CMRemix/android_external_jemalloc,wqfish/jemalloc,cpeterso/jemalloc,kmiku7/jemalloc,glandium/jemalloc,kmiku7/jemalloc,leebaok/jemalloc-4.2.1-readcode,wespelee/jemalloc,wqfish/jemalloc,awreece/jemalloc,jemalloc/jemalloc-cmake,geekboxzone/mmallow_external_jemalloc,CMRemix/android_external_jemalloc,TeamExodus/external_jemalloc,ahmetmircik/jemalloc,wfxiang08/jemalloc,awreece/jemalloc,wfxiang08/jemalloc,TeamExodus/external_jemalloc,VRToxin/android_external_jemalloc,kmiku7/jemalloc,kmiku7/jemalloc,ahmetmircik/jemalloc,AndroidExternal/jemalloc,VRToxin/android_external_jemalloc,yy-nm/jemalloc,vashstorm/jemalloc,CMRemix/android_external_jemalloc,TeamExodus/external_jemalloc,flyfeifan/jemalloc,wfxiang08/jemalloc,cpeterso/jemalloc,dxq-git/jemalloc,flyfeifan/jemalloc,tempbottle/jemalloc,cpeterso/jemalloc,yy-nm/jemalloc,garoose/jemalloc,Snaipe/jemalloc,geekboxzone/mmallow_external_jemalloc,Snaipe/jemalloc,shekkbuilder/jemalloc,tempbottle/jemalloc,glandium/jemalloc,wfxiang08/jemalloc,yy-nm/jemalloc,Dmitry-Me/jemalloc,garoose/jemalloc,AndroidExternal/jemalloc,dxq-git/jemalloc,glandium/jemalloc,awreece/jemalloc,awreece/jemalloc,yy-nm/jemalloc,lilothar/jemalloc,shekkbuilder/jemalloc,8l/jemalloc,vashstorm/jemalloc,lilothar/jemalloc,wespelee/jemalloc,8l/jemalloc,garoose/jemalloc,flyfeifan/jemalloc,shekkbuilder/jemalloc,Snaipe/jemalloc,flyfeifan/jemalloc,Dmitry-Me/jemalloc,AndroidExternal/jemalloc,ahmetmircik/jemalloc,geekboxzone/mmallow_external_jemalloc,TeamExodus/external_jemalloc,lvfeng1130/jemalloc,lvfeng1130/jemalloc