queries: add query location, change surface syntax

To disambiguate between a pipe and and query they now appear in the
surface syntax as pipe(<id>) and query(<id>), repsectively.
queries: handle queries in semantics

A packet may now end up in a physical location, a pipe, or a query. The
controller currently doesn't handle packet ins that end up in query
locations in any special way, i.e., it just ignores them for now.
queries: ignore impossible cases

Only packets with physical locations will be passed to this function, so
there's no need to handle the other cases, nor throw an exception in
those cases.
queries: make queries work with flowterp

They are treated in the same way as pipes.
queries: add function to recover query name, pred pairs
queries: group predicates for same query name
queries: lift barrier out of submodule

This is a general function that should be accessible to all of the
controller, if it's needed.
queries: implement stats helper

The stats helper will issue an individual stats request to a particular
switch, and produce a Deferred.t with the result, or an error.
queries: implement queries API for the controller

This API takes a predicate and collects the packet and byte counts for
all flows currently installed on the network that satisfy the predicate.
queries: do not count drop flows in query stats

By default, ignore the contribution of flows that match the predicate
but have a drop action. Users that wish to count the contribution of
these flows should set the optional argument ignore_drops to false.
queries: fix bug in drop action detection

The query function for the controller takes an optional argument to
indicate whether flows with drop actions should contribute to the packet
and byte counts of the query. The previous version had the drop action
detection inverted.
host: programmatically enable/disable host discovery

Related to #359

Conflicts:
	async/Async_NetKAT_Controller.ml
	async/Async_NetKAT_Controller.mli
Merge pull request #358 from frenetic-lang/queries

low-level queries