Fix bugs for dynamic interface configuration

- portNextObjStore is not updated when adding or removing portNextObjective
- Group keys for L2IG in flowObjectiveStore are deleted while modifying L2IG, which in turn causes an exception
- L3UG pointing to L2IG, which is already removed, is not removed
- Empty L2FG, with VLAN ID removed from the configuration, is not removed
- Bridging and unicast routing rules for hosts are not updated when changing port VLAN from untagged to tagged and vice versa

Change-Id: I9454fe553ae53e0fc8839a4ad629c0b5b9039a36
diff --git a/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java b/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
index 9313f34..b5fcbcb 100644
--- a/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
+++ b/app/src/main/java/org/onosproject/segmentrouting/RoutingRulePopulator.java
@@ -1685,12 +1685,15 @@
         srManager.flowObjectiveService.forward(deviceId, install ? fob.add(context) : fob.remove(context));
 
         if (!install) {
-            DefaultGroupHandler grpHandler = srManager.getGroupHandler(deviceId);
-            if (grpHandler == null) {
-                log.warn("updateFwdObj: groupHandler for device {} not found", deviceId);
-            } else {
-                // Remove L3UG for the given port and host
-                grpHandler.removeGroupFromPort(portNumber, tbuilder.build(), mbuilder.build());
+            if (!srManager.getVlanPortMap(deviceId).containsKey(vlanId) ||
+                    !srManager.getVlanPortMap(deviceId).get(vlanId).contains(portNumber)) {
+                DefaultGroupHandler grpHandler = srManager.getGroupHandler(deviceId);
+                if (grpHandler == null) {
+                    log.warn("updateFwdObj: groupHandler for device {} not found", deviceId);
+                } else {
+                    // Remove L3UG for the given port and host
+                    grpHandler.removeGroupFromPort(portNumber, tbuilder.build(), mbuilder.build());
+                }
             }
         }
     }