If all the connections in the queue have expired, we don't want to
return any of them. Because we previously dropped connections only
after retrieval, it was possible we would choose and return a dead
connection. Doing the cleanup first should prevent that.
Change-Id: I650537e7b44d6bdd552def6a3b2de42a60ed9b94
Closes-Bug: 1775341