further reduced system timing sensitivity in SocketConnectorBase

When testing the exception reported by SocketConnectorBase after a
connection failure, the test now uses lock and associated condition to
avoid synchronization issues.