Fixed an issue that caused FlowPusher to go into an infinite loop.

FlowPusher used to use the IOFSwitch object as a key in its data structures.
When the IOFSwitchListener inteface changed to include only the DPID in its
callback methods instead of the IOFSwitch, the FlowPusher is now not able
to get a reference to the switch once it has disconnected. This means
FlowPusher can't clean out its data structures and it if messages are still
in the queue for the switch it will try and send them forever.

The fix is to change FlowPusher so its internal data structures use the DPID
as the key. While doing this I also changed most of its APIs so that they also
reference switches by DPID rather than by IOFSwitch.

Change-Id: I255d64fdac21d8b147f991ff41f6ecace310b116
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
index e1aa320..0d53c9a 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/web/SuspendPusherResource.java
@@ -1,6 +1,6 @@
 package net.onrc.onos.core.flowprogrammer.web;
 
-import net.floodlightcontroller.core.IOFSwitch;
+import net.onrc.onos.core.util.Dpid;
 
 import org.projectfloodlight.openflow.util.HexString;
 import org.restlet.resource.Get;
@@ -35,12 +35,6 @@
             return false;
         }
 
-        IOFSwitch sw = provider.getSwitches().get(dpid);
-        if (sw == null) {
-            log.error("Invalid dpid");
-            return false;
-        }
-
-        return pusher.suspend(sw);
+        return pusher.suspend(new Dpid(dpid));
     }
 }