Fixed a possible race-condition in ConnectionPool when the connection factory yields.