Support threaded heap profiles in pprof

    - Add a --thread N option to select profile for thread N (otherwise, all
      threads will be printed)
    - The $profile map now has a {threads} element that is a map from thread id to
      a profile that has the same format as the {profile} element
    - Refactor ReadHeapProfile into smaller components and use them to implement
      ReadThreadedHeapProfile
Fix sdallocx() assertion.

Refactor sdallocx() and nallocx() to share inallocx(), and fix an
sdallocx() assertion to check usize rather than size.
Fix threaded heap profile bug in pprof.

Fix ReadThreadedHeapProfile to pass the correct parameters to
AdjustSamples.
Fix prof_tdata_get()-related regressions.

Fix prof_tdata_get() to avoid dereferencing an invalid tdata pointer
(when it's PROF_TDATA_STATE_{REINCARNATED,PURGATORY}).

Fix prof_tdata_get() callers to check for invalid results besides NULL
(PROF_TDATA_STATE_{REINCARNATED,PURGATORY}).

These regressions were caused by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
Fix a profile sampling race.

Fix a profile sampling race that was due to preparing to sample, yet
doing nothing to assure that the context remains valid until the stats
are updated.

These regressions were caused by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
Add sdallocx() to list of functions to prune in pprof.
add likely / unlikely macros
mark some conditions as unlikely

* assertion failure
* malloc_init failure
* malloc not already initialized (in malloc_init)
* running in valgrind
* thread cache disabled at runtime

Clang and GCC already consider a comparison with NULL or -1 to be cold,
so many branches (out-of-memory) are already correctly considered as
cold and marking them is not important.
Fix mallocx() to always honor MALLOCX_ARENA() when profiling.
Apply likely()/unlikely() to allocation/deallocation fast paths.
Fix irallocx_prof() sample logic.

Fix irallocx_prof() sample logic to only update the threshold counter
after it knows what size the allocation ended up being.  This regression
was caused by 6e73dc194ee9682d3eacaf725a989f04629718f7 (Fix a profile
sampling race.), which did not make it into any releases prior to this
fix.
Fix prof regressions.

Don't use atomic_add_uint64(), because it isn't available on 32-bit
platforms.

Fix forking support functions to manage all prof-related mutexes.

These regressions were introduced by
602c8e0971160e4b85b08b16cf8a2375aa24bc04 (Implement per thread heap
profiling.), which did not make it into any releases prior to these
fixes.
Fixed iOS build after OR1 changes
fix tls_model autoconf test

It has an unused variable, so it was always failing (at least with gcc
4.9.1). Alternatively, the `-Werror` flag could be removed if it isn't
strictly necessary.
Generate a pkg-config file
Ignore jemalloc.pc .
Convert all tsd variables to reside in a single tsd structure.
Add instructions for installing from non-packaged sources.
autoconf: Support cygwin in addition to mingw
Use MSVC intrinsics for lg_floor

When using MSVC make use of its intrinsic functions (supported on
x86, amd64 & ARM) for lg_floor.