Add automatic reconnect (with exponential back-off) to the socket backend.
If the connection is lost while pusing a change, try to reconnect.
Handle edge-cases that might come up depending on when the disconnect
happaned.
Currently the parameters are hardcoded: it will retry 5 times,
on the first retry it will wait 5 seconds before reconnecting.
There is an exponential backoff of 1.5, so on the fifth try it
will wait about 25 seconds.
This is particularly useful when conencting over Tor, as transient
interruptions are fairly common there.
Support the bracketed `socket:[::]:1234` syntax for IPv6 addresses.
Also, add factor out the socket URI parsing to a function and add
tests for it. As a forward compatibility measure, reject query strings
(`?a=b`) because I intend to use these for parameters such as SOCKS5
proxy (for Tor) in a future patch.