vmem: add vmem_malloc_usable_size() to API
Merge pull request #70 from spawlows/vmem-add-malloc-usable-size

vmem: add vmem_malloc_usable_size() to API
vmem: fix freeing memory by iqalloct()

In case of huge pages iqalloct() calls huge_dalloc() for the pool #0
(src/jemalloc/include/jemalloc/internal/jemalloc_internal.h.in:834),
but huge_dalloc() should be called with the pool 'arena->pool'
as an argument in functions huge_ralloc(), arena_ralloc()
and iralloct_realign().

Add two functions: pool_iqalloct() and pool_idalloct() in order
to be able to pass a 'pool' argument from pool_iqalloct()
to huge_dalloc().

Ref: pmem/issues#8
Merge pull request #72 from ldorau/vmem-fix-freeing-memory-by-iqalloct

vmem: fix freeing memory by iqalloct()
vmem: do not reinitialize the pool[0]->chunks_mtx mutex

The pool[0]->chunks_mtx mutex is locked at chunk.c:178
(called from malloc_init_base_pool() at jemalloc.c:362)
before being initialized at chunk.c:415
(called from malloc_init_base_pool() at jemalloc.c:364).

Move a call to pools_shared_data_create() to pool_new()
after a call to chunk_boot() in order to fix this bug.

Ref: pmem/issues#17