Break the references between Port and Link.

This is in preparation for implementing topology versioning. Ports may have
different Links in different versions of the topology, so we don't want the
reference inside the Port object. References are now held in indexes in the
NetworkGraphImpl.

As a result of this, there was a small API change:
  NetworkGraph.getLink  ->  NetworkGraph.getOutgoingLink
  NetworkGraph.getIncomingLink was added.

Change-Id: I086d198c8040607253c8729b9d5f94ab6bc738db
diff --git a/src/main/java/net/onrc/onos/core/topology/Port.java b/src/main/java/net/onrc/onos/core/topology/Port.java
index 75aac52..44f4bcf 100644
--- a/src/main/java/net/onrc/onos/core/topology/Port.java
+++ b/src/main/java/net/onrc/onos/core/topology/Port.java
@@ -1,7 +1,10 @@
 package net.onrc.onos.core.topology;
 
-// TODO Everything returned by these interfaces must be either Unmodifiable view,
-// immutable object, or a copy of the original "SB" In-memory Topology.
+import net.onrc.onos.core.util.SwitchPort;
+
+//TODO Everything returned by these interfaces must be either Unmodifiable view,
+//immutable object, or a copy of the original "SB" In-memory Topology.
+
 /**
  * Interface of Port object in Network Graph topology.
  */
@@ -22,6 +25,14 @@
     public Long getNumber();
 
     /**
+     * Gets a {@link SwitchPort} that represents this Port's dpid and port
+     * number.
+     *
+     * @return a SwitchPort representing the Port
+     */
+    public SwitchPort asSwitchPort();
+
+    /**
      * Gets the hardware address of this port.
      * <p/>
      * TODO Not implemented yet.