Add retry support for connection loss exception.

A new option: `retries` is introduced to the `createClient` method. The default value is `0`, which disables the retry behavior.

If the value is greater than 0, when connection loss exception is caught, the client will automatically retry the operation with exponentially back-off.