Refactor discoverd connection

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>
Use local client when host is also the leader

Signed-off-by: Jonathan Rudenberg <jonathan@titanous.com>