[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/tools/test/bin/atomix-service b/tools/test/bin/atomix-service
index 5910a8c..8eb6a5e 100755
--- a/tools/test/bin/atomix-service
+++ b/tools/test/bin/atomix-service
@@ -40,11 +40,9 @@
 fi
 
 # Define the java options for atomix
-# FIXME atomix-agent already provides a gc algorithm. Once we fix atomix-agent we can allow this
-# JAVA_OPTS="${JAVA_OPTS:--XX:+UseG1GC -XX:MaxGCPauseMillis=200}"
+JAVA_OPTS="${JAVA_OPTS:--XX:+UseG1GC -XX:MaxGCPauseMillis=200}"
 if [ ! -z "$ONOS_YOURKIT" ]; then
-    #JAVA_OPTS+=" -agentpath:$ATOMIX_INSTALL_DIR/libyjpagent.so=listen=all"
-    JAVA_OPTS="${JAVA_OPTS:--agentpath:$ATOMIX_INSTALL_DIR/libyjpagent.so=listen=all}"
+    JAVA_OPTS+=" -agentpath:$ATOMIX_INSTALL_DIR/libyjpagent.so=listen=all"
 fi
 
 case $2 in