vmem: fix race condition in chunk_alloc_default()

Protect "pool->arenas" with "pool->arenas_lock".
Move the call to chunk_recycle() outside chunk_alloc_core(),
because the lock is needed only when (pool->pool_id == 0).
Merge pull request #59 from ldorau/vmem-fix-race-condition-in-chunk_alloc_default

vmem: fix race condition in chunk_alloc_default()