Move logic to block into synchronize block

When reviewing the code with @stevenharman having the condition variable
blocking code in another method looked like a race condition.
Clean up `connection_available?`

Removing negation, collapsing a condition, and renaming the max pool
size made this code a lot easier to parse.