Make pool clients safe for concurrent access with mutex.

This pull request adds locking of pool clients to allow concurrent access.