Avoids disconnection from the switches

- Restarting the dispatcher if the queue is full
- Restarting the dispatcher during idle events
- Checking, during idle events, if the backlog can be drained
- Reducing the interval of idle events

Does not change the behavior of the state machine

Change-Id: I1721d8fad37e4e833d0fdfd12d51dc51a06559d0
diff --git a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelInitializer.java b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelInitializer.java
index b03f007..e636835 100644
--- a/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelInitializer.java
+++ b/protocols/openflow/ctl/src/main/java/org/onosproject/openflow/controller/impl/OFChannelInitializer.java
@@ -76,7 +76,7 @@
         pipeline.addLast("ofmessageencoder", OFMessageEncoder.getInstance());
         pipeline.addLast("ofmessagedecoder", OFMessageDecoder.getInstance());
 
-        pipeline.addLast("idle", new IdleStateHandler(20, 25, 0));
+        pipeline.addLast("idle", new IdleStateHandler(5, 25, 0));
         pipeline.addLast("timeout", new ReadTimeoutHandler(30));
 
         // XXX S ONOS: was 15 increased it to fix Issue #296