Fixes [ONOS-5415] and [ONOS-5491]

Changes:
- Introduces ordering between core ports and egress ports;
- Introduces ordering between egress ports;
- Introduces ttl_in and tll_out in the link collection compiler logic;
- Optimized push/pop mpls/vlan actions;
- Optimizes dec ttl related actions;
- Optimizes ttl_in and ttl_out actions;
- Makes the optimizations configurable;

Change-Id: I60f187031e89c366ec9c79d1652a5fb0da96c206
diff --git a/core/api/src/test/java/org/onosproject/net/NetTestTools.java b/core/api/src/test/java/org/onosproject/net/NetTestTools.java
index 842c86d..d6227a7 100644
--- a/core/api/src/test/java/org/onosproject/net/NetTestTools.java
+++ b/core/api/src/test/java/org/onosproject/net/NetTestTools.java
@@ -258,4 +258,17 @@
         );
     }
 
+    /**
+     * Builds a treatment which contains the dec ttl
+     * actions.
+     *
+     * @return the treatment
+     */
+    public static TrafficTreatment decTtlTreatment() {
+        return DefaultTrafficTreatment.builder()
+                .decMplsTtl()
+                .decNwTtl()
+                .build();
+    }
+
 }