MFC r339877-r339879,r343564-r343566,r343580,r343754:
Untangle jemalloc and mutexes initialization.
The merge includes required warnings cleanup by arichardson, both to
avoid conflicts and to make rtld_malloc.c compilable with the libthr
WARNS settings.