[SDFAB-933] Integrate atomix-3.1.12 and expose demote API

Additionally, this patch adds unit tests for demote and
updates a bunch of testing tools

Change-Id: I9636078b08486c9167ae253f0251f72239ad2802
diff --git a/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java b/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java
index 442aaef..d6a7eae 100644
--- a/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java
+++ b/core/net/src/main/java/org/onosproject/cluster/impl/MastershipManager.java
@@ -305,6 +305,15 @@
         Futures.getUnchecked(balanceRolesFuture);
     }
 
+    @Override
+    public void demote(NodeId instance, DeviceId deviceId) {
+        checkNotNull(instance, NODE_ID_NULL);
+        checkNotNull(deviceId, DEVICE_ID_NULL);
+        checkPermission(CLUSTER_WRITE);
+
+        store.demote(instance, deviceId);
+    }
+
     /**
      * Balances the nodes specified in controllerDevices.
      *