learn_all: learn all unknown src addresses

The learning application as previously written would not always learn
all mac addesses on the network, as it was sending packets to the
controller with an unknown destination rather than an unknown source.
Rather than checking for an unknown destination, the learning
application now checks for unknown sources to send to the controller.

This change will break broadcast traffic, as the check on unknown
destinations was what the application relied on to properly forward
broadcast traffic from the controller. An additional check that the
destination is a broadcast address fixes this issue while leaving the
rest of the code untouched.
filter: initial implementation of Pred module

Pred.t is the pred analogue of the app type for policy. It allows you to
create and compose applications that will produce pred updates in
response to network events.
filter: constructor for asyncronous Pred.t updates
filter: add partial application point to async_handler

The handler may want to store the update pipe for asynchronous updates.
The partial application point allows it to do so.
filter: use mk_{and,or,not} predicate constructors
expose_raw: Expose raw_app as Raw module

The Raw module provides access to the underlying Raw_app.t while
providing a nicer interface to users.
filter: initial implementation of Pred module

Pred.t is the pred analogue of the app type for policy. It allows you to
create and compose applications that will produce pred updates in
response to network events.

Conflicts:
	async/Async_NetKAT.ml
	async/Async_NetKAT.mli
filter: constructor for asyncronous Pred.t updates
filter: add partial application point to async_handler

The handler may want to store the update pipe for asynchronous updates.
The partial application point allows it to do so.
filter: use mk_{and,or,not} predicate constructors
expose_raw: Reorg app interface into Policy module

The Async_NetKAT module has been reorganized into three submodules and
related functions. Creation functions are included in their respective
submodules, while combinators are in the top-level so they do not have
to be qualified for use. This should allow one to open the Async_NetKAT
module and get dropped into an environment for easy app creation and
composotion.
daft_punk: Add in_edge helper function to TUtil

Determines whether a switch_id, port_id pair belongs to the edge of the
network.
daft_punk: add Flip app supporting dynamic configuration

The Flip app allows users to create simple Pred-based applications that
are dynamically configurable. The constructor takes a predicate that
will be used when the app is enabled. When the Flip.t is disabled, the
app will produce a False policy update.
daft_punk: rewrite host discovery

Host discovery is now split up into two parts:

  * A configurable application that determines the policy that should be
    installed on the network; and
  * A Stage.t that will actually do the PacketIn processing, and respond
    to other network events.

Splitting it up into two parts is important so as to keep a consistent
order of network events. Prevously, a PacketIn would be processed by the
application and, if necessary, the application would send a HostUp event
into the event stream. However this HostUp event would be inserted into
the "beginning" of the event stream, opening up the possibility that a
PortDown event on that host's port would reach the controller before the
applications even saw the HostUp event. This could result in a situation
where an application received a HostUp event without the NIB reflecting
it.

The same issue exists with switch link discovery. This will be fixed
next.
daft_punk: add TUtil.edge to compute edge of network
daft_punk: reimplement switch and link and discovery
daft_punk: negate managed traffic
daft_punk: Use a Bus instead of a Pipe in the Flip app

When an app is used multiple times as a "sub-app", its handler is called
multiple times to create different callbacks. Each invocation of the
handler is passed a unique asynchronous update pipe. In order to support
reuse of the app, each asynchronous update caused by runtime
re-configuration must be written to each of these pipes. Previously, it
was only being written to one (whichever one the Async runtime chose to
perform first). Now, The ctl object maintains a bus that each occurrence
of the app subscribes to for asynchronous policy updates.
daft_punk: enable discovery after running app

It's necessary to ensure this ordering, otherwise the application will
not get the initial policy update enabling it.
daft_punk: controller returns ctl object, add discovery flag to katnetic