added ClientConfig.connectionAttempts to provide an upper bound to conne...

...ction attempts.

fixes #1 

@DanSimon