Take out pool semaphore early

Take out the semaphore immediately after initial pool creation.
Only mutex lock if pooling is enabled (maxcons> 0).