Fixing Protected P2PIntent Compiler issues

- Register ProtectionConstraint
- Workaround for NPE in P2PIntent Compiler
  buildFailoverTreatment sometimes throw NPE,
  when the Group was not available by the time building the head-end treatment.
- debug log and cosmetic fixes

This might be related to ONOS-5183

Change-Id: I5ffc78619951fd8c4a35e985b3b849a1702080e8
diff --git a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
index 60030ee..64eda0e 100644
--- a/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
+++ b/core/store/serializers/src/main/java/org/onosproject/store/serializers/KryoNamespaces.java
@@ -189,6 +189,7 @@
 import org.onosproject.net.intent.constraint.LinkTypeConstraint;
 import org.onosproject.net.intent.constraint.ObstacleConstraint;
 import org.onosproject.net.intent.constraint.PartialFailureConstraint;
+import org.onosproject.net.intent.constraint.ProtectionConstraint;
 import org.onosproject.net.intent.constraint.WaypointConstraint;
 import org.onosproject.net.link.DefaultLinkDescription;
 import org.onosproject.net.meter.MeterId;
@@ -550,6 +551,7 @@
             .register(DiscreteResourceCodec.class)
             .register(new ImmutableByteSequenceSerializer(), ImmutableByteSequence.class)
             .register(PathIntent.ProtectionType.class)
+            .register(ProtectionConstraint.class)
             .build("API");
 
     /**