[ONOS-6481] Fix Intent resource release issue

Lables for encapsulation won't release because Intent manager release the
resources by Intent key only.

Allocate encapsulation labels by using Intent key instead of Intent Id to
resolve this problem.

Change-Id: I8fd52245063ded725e4b2c3911f52c029591ab90
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
index b236d59..78a2f39 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/compiler/PathCompiler.java
@@ -121,7 +121,7 @@
 
         Map<LinkKey, Identifier<?>> vlanIds = labelAllocator.assignLabelToLinks(
                 linksSet,
-                intent.id(),
+                intent.key(),
                 EncapsulationType.VLAN
         );
 
@@ -238,7 +238,7 @@
 
         Map<LinkKey, Identifier<?>> mplsLabels = labelAllocator.assignLabelToLinks(
                 linksSet,
-                intent.id(),
+                intent.key(),
                 EncapsulationType.MPLS
         );
         Iterator<Link> links = intent.path().links().iterator();