Refactor connectivity intent creation to use builders

- Each connectivity intent now has only one constructor
- Intent constructors are now private for leaf classes and
  protected for classes that can be derived from
- Each intent class has a Builder class that accumulates
  parameters for intent creation
- Each intent class has a public static builder() method
  to create a builder
- Each Builder class has a build() method to create the
  intent from the accumulated parameters
- Added keys to a few intent types that were missing them
- Tightened up usage of checkNotNull(), taking advantage of
  the return value to save some lines of code
- Modified callers to use the builders instead of directly
  calling the constructors

Change-Id: I713185d5ecbadbf51f87ef7f68fec41102106c78
diff --git a/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java b/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java
index a4a3a7c..f1554b6 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AddHostToHostIntentCommand.java
@@ -15,19 +15,15 @@
  */
 package org.onosproject.cli.net;
 
+import java.util.List;
+
 import org.apache.karaf.shell.commands.Argument;
 import org.apache.karaf.shell.commands.Command;
 import org.onosproject.net.HostId;
-import org.onosproject.net.flow.DefaultTrafficSelector;
-import org.onosproject.net.flow.DefaultTrafficTreatment;
-import org.onosproject.net.flow.TrafficSelector;
-import org.onosproject.net.flow.TrafficTreatment;
 import org.onosproject.net.intent.Constraint;
 import org.onosproject.net.intent.HostToHostIntent;
 import org.onosproject.net.intent.IntentService;
 
-import java.util.List;
-
 /**
  * Installs host-to-host connectivity intent.
  */
@@ -50,14 +46,16 @@
         HostId oneId = HostId.hostId(one);
         HostId twoId = HostId.hostId(two);
 
-        TrafficSelector selector = DefaultTrafficSelector.emptySelector();
-        TrafficTreatment treatment = DefaultTrafficTreatment.emptyTreatment();
         List<Constraint> constraints = buildConstraints();
 
-        HostToHostIntent intent = new HostToHostIntent(appId(), key(),
-                                                       oneId, twoId,
-                                                       selector, treatment,
-                                                       constraints, priority());
+        HostToHostIntent intent = HostToHostIntent.builder()
+                .appId(appId())
+                .key(key())
+                .one(oneId)
+                .two(twoId)
+                .constraints(constraints)
+                .priority(priority())
+                .build();
         service.submit(intent);
         print("Host to Host intent submitted:\n%s", intent.toString());
     }