Fix TLS destructor ordering problems
Fix TLS destructor ordering problems

Glibc calls thread-specific dtors in the order in which the keys were added,
so the first dtor is the trace_cache_free() one. Then thread-specific
data for some other key is free()d, which calls into unw_backtrace(),
which uses dangling cache and munmapped cache->frames.

[ Minor rename + compiler warning fix: asharma@fb.com ]
Signed-off-by: Paul Pluzhnikov <eceb66078c8d0c18f1ed9d9459677288f3b6e0b8@google.com>

android-ia/platform_external_libunwind,jrmuizel/libunwind,tkelman/libunwind,libunwind/libunwind,igprof/libunwind,tronical/libunwind,fdoray/libunwind,cms-externals/libunwind,zliu2014/libunwind-tilegx,SyndicateRogue/libunwind,pathscale/libunwind,CyanogenMod/android_external_libunwind,vtjnash/libunwind,krytarowski/libunwind,atanasyan/libunwind-android,krytarowski/libunwind,pathscale/libunwind,atanasyan/libunwind-android,joyent/libunwind,unkadoug/libunwind,igprof/libunwind,wdv4758h/libunwind,joyent/libunwind,android-ia/platform_external_libunwind,vegard/libunwind,lat/libunwind,tkelman/libunwind,fdoray/libunwind,tony/libunwind,dagar/libunwind,libunwind/libunwind,adsharma/libunwind,project-zerus/libunwind,martyone/libunwind,atanasyan/libunwind,fillexen/libunwind,maltek/platform_external_libunwind,zliu2014/libunwind-tilegx,yuyichao/libunwind,fdoray/libunwind,zeldin/platform_external_libunwind,frida/libunwind,bo-on-software/libunwind,rantala/libunwind,dropbox/libunwind,mpercy/libunwind,tony/libunwind,dropbox/libunwind,rntz/libunwind,rogwfu/libunwind,androidarmv6/android_external_libunwind,atanasyan/libunwind,geekboxzone/lollipop_external_libunwind,joyent/libunwind,geekboxzone/lollipop_external_libunwind,pathscale/libunwind,geekboxzone/mmallow_external_libunwind,vtjnash/libunwind,dreal-deps/libunwind,vegard/libunwind,geekboxzone/mmallow_external_libunwind,DroidSim/platform_external_libunwind,evaautomation/libunwind,cloudius-systems/libunwind,frida/libunwind,mpercy/libunwind,Keno/libunwind,maltek/platform_external_libunwind,Keno/libunwind,geekboxzone/mmallow_external_libunwind,zliu2014/libunwind-tilegx,ehsan/libunwind,olibc/libunwind,unkadoug/libunwind,dropbox/libunwind,cms-externals/libunwind,wdv4758h/libunwind,CyanogenMod/android_external_libunwind,jrmuizel/libunwind,lat/libunwind,tronical/libunwind,tony/libunwind,bo-on-software/libunwind,dagar/libunwind,Chilledheart/libunwind,libunwind/libunwind,atanasyan/libunwind-android,adsharma/libunwind,rntz/libunwind,project-zerus/libunwind,lat/libunwind,CyanogenMod/android_external_libunwind,rogwfu/libunwind,dreal-deps/libunwind,DroidSim/platform_external_libunwind,zeldin/platform_external_libunwind,fillexen/libunwind,olibc/libunwind,unkadoug/libunwind,yuyichao/libunwind,rogwfu/libunwind,atanasyan/libunwind,evaautomation/libunwind,cloudius-systems/libunwind,ehsan/libunwind,wdv4758h/libunwind,frida/libunwind,androidarmv6/android_external_libunwind,dagar/libunwind,martyone/libunwind,dreal-deps/libunwind,project-zerus/libunwind,cms-externals/libunwind,cloudius-systems/libunwind,tkelman/libunwind,djwatson/libunwind,tronical/libunwind,SyndicateRogue/libunwind,vtjnash/libunwind,maltek/platform_external_libunwind,igprof/libunwind,android-ia/platform_external_libunwind,vegard/libunwind,yuyichao/libunwind,rntz/libunwind,djwatson/libunwind,fillexen/libunwind,jrmuizel/libunwind,evaautomation/libunwind,mpercy/libunwind,DroidSim/platform_external_libunwind,Keno/libunwind,Chilledheart/libunwind,bo-on-software/libunwind,Chilledheart/libunwind,rantala/libunwind,olibc/libunwind,SyndicateRogue/libunwind,zeldin/platform_external_libunwind,ehsan/libunwind,djwatson/libunwind,androidarmv6/android_external_libunwind,geekboxzone/lollipop_external_libunwind,martyone/libunwind,rantala/libunwind,adsharma/libunwind,krytarowski/libunwind