Fix for Bug #308: Zombie Flows after Flow add/delete

Store the common matching conditions for all Flow Entries
in the FlowPath entry.
Thus, if the Shortest Path computation fails and the Flow Entries
are deleted, those common matching conditions are preserved.
diff --git a/web/add_flow.py b/web/add_flow.py
index 5a248eb..4f502f6 100755
--- a/web/add_flow.py
+++ b/web/add_flow.py
@@ -340,6 +340,9 @@
   flow_path['flowId'] = flow_id
   flow_path['installerId'] = installer_id
 
+  if (len(match) > 0):
+    flow_path['flowEntryMatch'] = copy.deepcopy(match)
+
   #
   # Add the match conditions to each flow entry
   #
@@ -393,7 +396,6 @@
     dst_port = {}
     src_switch_port = {}
     dst_switch_port = {}
-    flow_entry = {}
     flow_entries = []
 
     src_dpid['value'] = parsed_args[idx]['my_src_dpid']
@@ -404,9 +406,6 @@
     src_switch_port['port'] = src_port
     dst_switch_port['dpid'] = dst_dpid
     dst_switch_port['port'] = dst_port
-    match = parsed_args[idx]['match']
-    flow_entry['flowEntryMatch'] = match
-    flow_entries.append(flow_entry)
 
     data_path['srcPort'] = copy.deepcopy(src_switch_port)
     data_path['dstPort'] = copy.deepcopy(dst_switch_port)