query: add pred parameter to Query constructor

Rather than producing a unique name for ever predicate that an app may
want to listen on, just includ the pred for the query in the event to
disambiguate.
query: Implement internal Query module

All functions related to executing queries should live in the Query
module. Currently, it provides a single function called `every` that
will run the list of queries periodically depending on the first
argument, which is a Time.Span.
query: Handle queries in the controller
query: implement traffic monitoring app
query: Query fixes
query: fix bugs in Transaction

First, do not start xids at 0, as that is the xid that's used when the
xid is irrelevant. This also allows the Transaction stage to skip over
messages with xid = 0 and avoid one-to-two Hashtbl lookups per message.

Second, send was generating two xids. The first was used to insert an
Ivar.t into the lookup table, and the second was the one that was
actually sent to the switch. This is no longer the case. send now
consistently uses a single xid.