Invert some if conditions

Signed-off-by: Lewis Marshall <lewis@lmars.net>
Stop reconnecting if the client has been closed
Reconnect in the background when registration detects disconnect

Signed-off-by: Lewis Marshall <lewis@lmars.net>
Add to the TestReconnect test

Signed-off-by: Lewis Marshall <lewis@lmars.net>
Pass the disconnected client to the reconnect method

This has the side effect of only needing a single mutex to protect the
rpc client

Signed-off-by: Lewis Marshall <lewis@lmars.net>
Reconnect in the background when subscription detects disconnect

Signed-off-by: Lewis Marshall <lewis@lmars.net>