[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/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java b/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java
index fe9868a..bac18ad 100644
--- a/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java
+++ b/core/api/src/main/java/org/onosproject/cluster/LeadershipAdminService.java
@@ -54,4 +54,15 @@
      * @return mapping from topic to leadership info.
      */
     Map<String, Leadership> getLeaderBoard();
+
+    /**
+     * Attempts to demote a node to the bottom of the candidate list. It is not allowed
+     * to demote the current leader
+     *
+     * @param topic leadership topic
+     * @param nodeId identifier of node to be demoted
+     * @return {@code true} if nodeId is now the bottom candidate. This method returns {@code false}
+     * if {@code nodeId} is not one of the candidates for the topic or if it is the leader.
+     */
+    boolean demote(String topic, NodeId nodeId);
 }