Change the APIs to instantiate Resource and ResourceId

Now, DiscreteResource/DiscreteResourceId is provided by DiscreteFactory.
Similarly, ContinuousResource/ContinuousResourceId is provided by
ContinuousFactory. These factory instances can be obtained by static
factory method such as Resource.discrete(...) or Resource.continuous(...).

Change-Id: Ic94f7336c0e1f74cf2dddcac899de300362aff3e
diff --git a/cli/src/main/java/org/onosproject/cli/net/AllocationsCommand.java b/cli/src/main/java/org/onosproject/cli/net/AllocationsCommand.java
index 869868f..715fef0 100644
--- a/cli/src/main/java/org/onosproject/cli/net/AllocationsCommand.java
+++ b/cli/src/main/java/org/onosproject/cli/net/AllocationsCommand.java
@@ -106,7 +106,7 @@
         // TODO: Current design cannot deal with sub-resources
         //        (e.g., TX/RX under Port)
 
-        Resource resource = Resource.discrete(did, num);
+        Resource resource = Resource.discrete(did, num).resource();
         if (lambda) {
             //print("Lambda resources:");
             Collection<ResourceAllocation> allocations