Respect the max idle connections limit.

The structure here is a bit ugly. But it permits a single 'synchronized'
block, which makes the method easier to reason about.

Closes https://github.com/square/okhttp/issues/1239
Fixed. I was spending all my time contemplating whether to switch from LinkedList to ArrayList or ArrayDeque. Probably going to ArrayDeque as a separate change is best.