reactive: Initial impl of reactive controller

  usage: ./reactive FILE

At the moment the controller can take a HeisenKAT program as input and
determine the choice to install on the switch statically. It currently
does not respond to PorStatus messages.

Note that this and subsequent commits depend on the
ocaml-openflow/reactive branch.
reactive: factor out state/transitions into a module

Separate the model loop from state updates.
reactive: Update state based on PortStatus messages

Note that this does not yet update flowtable rules on switches.
reactive: fix bug in in Eof cases

These cases were updating `state`, i.e., the initial state rather than `s`,
the current state. Rename it `init_state` to avoid this confusion in the
future.
reactive: store the switch id as a VInt.t
reactive: Respond to PortStatus messages

This version of the controller will respond to PortStatus messages by
clearing the flowtable and install rules given the new set of active
ports.
reactive: Fix definition of pick group

`ports` is a set of all all ports that are up on the switch. Given that,
the valid groups are the ones that only make reference to up ports.

This is a simplified view though. Since groups are parallel compositions
of sequenced actions, you could eliminate those parallel branches that
make refrence to not up ports. But keeping track of the combinatorics
for the purposes of efficient, incremental removal of flowtable rules
when a port goes down isn't feasible in the general.

In the common case, this may not be a problem.
reactive: replace filter_map with library function

Core provides an implementation of filter_map, which is also correct.
The previous implementation reversed the list.
reactive: add logging calls (dis)connect

In particular log the live ports that the switch has when it connects.
This will be helpful for debugging fast-failover issues in the future.
reactive: low-priority rule to drop unrecognized packets

Rogue ICMP traffic is messing with the experiments. Add a low-priority
rule to drop all packets that preceding flows did not handle.
reactive: add logging to add/remove port ops
reactive: fix bug in updating state

Handling any switch message would result in an infinite loop. The
deffered in the state for reading a switch event (`s.State.e`) is never
replaced with a new deferred when handling messages. On the next
iteration, choose would immediately return with the same switch event,
as that deferred was already determined in the previous iteration, and
the current iteration would process the same event again.
reactive: respond to PortState { reason = Modify } messages

Add indicates a new port coming into existence. Delete indicates that an
existing has been removed from the switch. Modify messages indicate when
a link goes down or up.
reactive: drop flows if no specialization exists

If a flow has a single group that involves a port that is down, then the
flow must be dropped.
reactive: Change log level for port changes
reactive: make the controller "incremental"

The previous design would delete all flowtable entries and install new
ones when a port would go down on a switch. The current design installs
overlapping rules of different priorities, each corresponding to a
different choice of output port, and instead removes and adds individual
rules when a port goes up or down.

Note that this code makes the assumption that each group in an action
only involves a single port. If it weren't for that, it would be
somewhat difficult to implement this functionality in complete
generality.