Adds global lock to augment per-session concurrency limits

As noted in 5a384647bad7b0c82a03ebba49d2342cd1bbe41c, once the
number of connections in the connection pool is exhausted, it will
start canceling existing connections, which is not the behavior we want.
Before this change, this was possible with enough clients. In addition to the
session-specific locking, this adds a server-wide semaphore with the same
size as the connection pool. This should prevent those error conditions from
happening.