Stop the background ping when the client has been closed.

The for-loop in BackgroundPing continued to run even after Close was called on the client. With a closed client the ping would cause Go to panic. The panic occurs because the node.conn field is set to nil when the node is closed and ping tries to use the field.