thread_pool/reslist: take ownership of the pool when we lock the mutex

(except in cases where there is no chance that the pool is used)



git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1460183 13f79535-47bb-0310-9956-ffa450edef68