Add IP mask support to patterns.
Implement intersection for masked header fields.
Begin refactoring from PosNeg to PrefixTable.
Implement TODOs from refactoring.

Also, functorize PrefixTable and begin refactoring
optimizations into PrefixTable.
app: only process packet_ins from physical ports
app: sequence static katnetic static policy

It doesn't make much sense to run a static policy in parallel to
learning. Change the behavior of katnetic so that it sequences the
static policy before learning.

In the future, it may be useful to allow users to specify from the
command-line whether to sequence the static policy before or after
learning.
app: don't require a policy to run katnetic

If no policy is provided to `katnetic run` then it will default to using
the static policy "filter *", i.e., allow all packets.
app: app api supports asynchronous policy updates

You can now use the `create_async` app constructor to create
applications that can push asynchronous policy updates. The handler you
pass to `crate_async` will be passed a send struct that contains

  1. a Pipe.Writer.t for packet_out messages; and
  2. a Pipe.Writer.t for policy updates.

A policy update is one of three things:

  type update
    = Async of policy
    | Event of policy
    | EventNoop

Use the first constructor exclusively for policy updates. The second two
are used when pushing policy updates in response to network events. Use
`Event pol` and a policy update is necesasry in response to a network
event, and use `EventNoop` when the network event requires no policy
update.

It's important to note that the handler no longer returns an
optional policy as the result of its Deferred.t. You must now write to
the policy update to pipe provided to your handler function. For updates
that are in response to network events, you _must_ write an update
before the Deferred.t becomes determined. If you fail to, it will lock
up or crash the controller.
Make fields compatible with functor.
Initial Consistent Updates commit

Basic 2-Phase Commit algorithm, disabled

Basic consistent updates test app. Currently breaks when Controller actions get spliced in, which causes unrealizable mods. Easy fix is to stamp VLAN
Added barriers/ivars protocol

Updates working modulo topo discovery

Current topology discovery is super slow so we think every port is an external port
Added single-switch consistent update

More efficient per-switch consistent update
Block on barrier send before reading Ivar

Updates are working for tree,2,2!
Added consistent update flag. Reformatted.
Do not convert any-masks to predicates.
Fix interfacing between PrefixTable and Option functor.
app: fix typos in comments
app: hide raw_app details behind create_async

Previously, create_async was a thin wrapper around create_primitive from
the raw_app module and did not hide any of the requirements of that
module. Now, create_async more closely resembes the create constructor.
In response to network events, a handler must return an optional policy.
If it wishes to send asynchronous updates, it can write policies to
send.update pipe.

A user can write a completely asynchronous application using this
constructor. In response to network events the application should always
return `None`, but is free to write as many policies as it would like
to the send.update pipe, both within the network event handler and
outside of it.
app: transfer updates in batches in create_async

The documentation for Pipe.transfer is out-of-date, and will only
transfer one item at a time. In the event that the size budget for
update queues is increased, it's necessary that this code do a batch
transfer in order to make full use of the size budget.

See janestreet/async_kernel#3 for more info.
app: Remove unnecessary Monitor.try_with use

send_pkt_out consists of a single asynchronous operation that reports
any errors that it may have encountered. Just use its return value to do
error detection.