Use exponential back off for connection retries

The logic used to delay reconnection attempts was too permissive.

Use a randomized exponential backoff.
The maximum timeout is (1000 + 100·(2<sup>n</sup> - 1)) ms on the n'th try.

Example:
```
1: 1031ms
2: 1026ms
3: 1123ms
4: 1141ms
5: 1767ms
6: 5186ms
7: 11767ms
8: 24392ms
9: 44311ms
10: 83400ms
```