Reduce the chance of apps triggering fake mastership events

The GeneralDeviceProvider works with device IDs with prefix "device:",
which is the same leadership topic prefix used by the Mastership
service. This caused an issue when any app was creating leadership
contests with topic deviceId.toString() (e.g. XConnectManager,
DefaultRoutingHandler, etc), as the resulting leadership events where
picked by the mastership service and propagated, because of the "device:"
prefix.

This patch minimizes the occurrence of such issue by choosing a more
specific leadership topic prefix for the mastership service. However,
the right solution would be to add isolation of leadership contests
between different services/apps.

Change-Id: I333fd9796a66bb4ca04cd2facd337ac57a2947b2
diff --git a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java
index da8dda3..3c27df2 100644
--- a/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java
+++ b/core/store/dist/src/main/java/org/onosproject/store/mastership/impl/ConsistentDeviceMastershipStore.java
@@ -93,8 +93,10 @@
     private static final MessageSubject ROLE_RELINQUISH_SUBJECT =
             new MessageSubject("mastership-store-device-role-relinquish");
 
+    private static final String DEVICE_MASTERSHIP_TOPIC_PREFIX = "device-mastership:";
+
     private static final Pattern DEVICE_MASTERSHIP_TOPIC_PATTERN =
-            Pattern.compile("^device:(.*)");
+            Pattern.compile("^" + DEVICE_MASTERSHIP_TOPIC_PREFIX + "(.*)");
 
     private ExecutorService eventHandler;
     private ExecutorService messageHandlingExecutor;
@@ -363,7 +365,7 @@
     }
 
     private String createDeviceMastershipTopic(DeviceId deviceId) {
-        return String.format("device:%s", deviceId.toString());
+        return String.format("%s%s", DEVICE_MASTERSHIP_TOPIC_PREFIX, deviceId.toString());
     }
 
     private DeviceId extractDeviceIdFromTopic(String topic) {