Several fixes for Segment Routing

1. In getSubnetNextObjectiveId, do not create a broadcast group if it does not exist
       The creation is done when device is up and when config is added
2. Check if broadcast group exists before creating one
3. Put subnet in a Set instead of a List to avoid duplicated elements

Change-Id: Ifafd8e783a9d98aa62b5e299f560897458b90bb0
diff --git a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
index a5ac678..012f134 100644
--- a/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
+++ b/apps/segmentrouting/src/main/java/org/onosproject/segmentrouting/SegmentRoutingManager.java
@@ -375,7 +375,7 @@
             return null;
         }
         // vlan assignment is expensive but done only once
-        List<Ip4Prefix> configuredSubnets = deviceConfiguration.getSubnets(deviceId);
+        Set<Ip4Prefix> configuredSubnets = deviceConfiguration.getSubnets(deviceId);
         Set<Short> assignedVlans = new HashSet<>();
         Set<Ip4Prefix> unassignedSubnets = new HashSet<>();
         for (Ip4Prefix sub : configuredSubnets) {