[mempool] add debug mode and fix bad free
[thread_pool] don't use vector but replace by mempool and linked list