Stop reconnecting if the client has been closed

Signed-off-by: Lewis Marshall <lewis@lmars.net>
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>
Wait for a heartbeat in TestReconnect

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