[ONOS-6016] Enhance IntentInstaller for FlowObjective

Note:
Provide order of objective context (for remove only)
Handling objective errors in intent installer

Change-Id: I50bb9d7a17a0ae71d22ba035cd5bc80f485ec45a
diff --git a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
index 44fc986..37bf9d2 100644
--- a/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flowobjective/impl/FlowObjectiveManager.java
@@ -265,7 +265,8 @@
 
     private boolean queueObjective(DeviceId deviceId, ForwardingObjective fwd) {
         if (fwd.nextId() == null ||
-                flowObjectiveStore.getNextGroup(fwd.nextId()) != null) {
+                flowObjectiveStore.getNextGroup(fwd.nextId()) != null ||
+                fwd.op() == Objective.Operation.REMOVE) {
             // fast path
             return false;
         }