close connections properly

Creates an additional flag isClosed to mark that the connection has been closed.  
The Pick method is modified to ensure that a closed or at capacity connection is not picked