Ported ZookeeperRegistry to new Curator version using their notifications

Change-Id: Ie2319d0f11a1ebd2c34ceb7c9e0fb9c5aa085708

Implemented asynchronous leadership change notification.
This is needed to prevent deadlock in original switch registry code
(this used to be provided by my Curator modifications, but the official
Curator leader latch implementation gives notifications on the calling thread).

Change-Id: Ic3db816c98e4fc2b7a85d0007740b28afc4566a6

Remove local (modified) curator libraries and clean up the pom.xml
Amended to fix tests that broke due to an API change.

Change-Id: I09de15de2dd448b06712e93724c1b75160768db3
diff --git a/src/main/java/net/onrc/onos/registry/controller/SwitchLeadershipData.java b/src/main/java/net/onrc/onos/registry/controller/SwitchLeadershipData.java
index eb513fd..0b29964 100644
--- a/src/main/java/net/onrc/onos/registry/controller/SwitchLeadershipData.java
+++ b/src/main/java/net/onrc/onos/registry/controller/SwitchLeadershipData.java
@@ -2,16 +2,20 @@
 
 import net.onrc.onos.registry.controller.IControllerRegistryService.ControlChangeCallback;
 
-import com.netflix.curator.framework.recipes.leader.LeaderLatch;
+import org.apache.curator.framework.recipes.leader.LeaderLatch;
+import org.apache.curator.framework.recipes.leader.LeaderLatchListener;
 
 public class SwitchLeadershipData {
 	
-	private LeaderLatch latch;
-	private ControlChangeCallback cb;
+	private final LeaderLatch latch;
+	private final ControlChangeCallback cb;
+	private final LeaderLatchListener listener;
 
-	public SwitchLeadershipData(LeaderLatch latch, ControlChangeCallback cb) {
+	public SwitchLeadershipData(LeaderLatch latch, ControlChangeCallback cb,
+			LeaderLatchListener listener) {
 		this.latch = latch;
 		this.cb = cb;
+		this.listener = listener;
 	}
 	
 	public LeaderLatch getLatch(){
@@ -21,5 +25,9 @@
 	public ControlChangeCallback getCallback(){
 		return cb;
 	}
+	
+	public LeaderLatchListener getListener() {
+		return listener;
+	}
 
 }