Fix destruction order
Summary:
- Added `hazptr.cpp` and `memory_resource.cpp`. Moved singleton code to source.
- Changed the singleton for the default `hazptr_domain` to a global.
- Changed hazptr_stats singleton to a global.
- Moved the thread caching calls from the hazptr_domain functions to the constructor/destructor of hazptr_holder.
- Changed the TLS singletons to TLS globals.
- Changed some inlining directives.
- Leak the hazptr_rec-s in the default domain
Reviewed By: davidtgoldblatt, djwatson
Differential Revision:
D5553753
fbshipit-source-id:
da69eecec55c0f78fb8ef5591f9aeffee99ff3fa