wrote policy-generator test
switches: Group topology terms into switch terms

This commit changes the internal representation of topology terms within
the automaton-based dehopification algorithm. Previously, the algorithm
treated link terms in parallel composition as independent entities.

  topo = (1@1 => 2@1 | 1@2 => 3@1 | 2@1 => 3@2)

This meant that link-free policies would be distributed across the
entire parallel composition:

  lfp ; topo = (lfp ; 1@1 => 2@1) | (lfp ; 1@2 => 3@1) | ...

which would lead to rapid growth in transformed program size.

Instead, the algorithm now recognizes when link terms with the same
source switch are combined in parallel composition, and consider that a
single link term for the purposes of distributing sequences. The
distribution is actually done at a later point in the algorithm where it
can be implemented more efficiently as a port filter on the local
policy.

Note that this currently only applies for compositions that associate to
the left, which means you will only see the effect on one or two switch
policies if the policies are not crafted carefully. To clarify,

  (1@1 => 2@1 | 1@2 => 3@1 | 2@1 => 4@1 | 2@2 => 4@2)

will only group switch 1, whereas

  (1@1 => 2@1 | 1@2 => 3@1) | (2@1 => 4@1 | 2@2 => 4@2)

will group both switch 1 and switch 2.
switches: collect whole topolgy terms

This commit is a follow-up to the last, with further grouping of link
terms. Now, rather than just grouping links on the same switch, any
parallel composition of link terms is stored as a single unit. In other
orwds, the automaton now works over sequence of link-free policies and
topology terms.

Results: abfattree-tables-fail-full-4-3.kat

  Generate using the script in ocaml-topology:

    python abfattree.py -k abfattree-tables-fail-full-4-3.kat -t tables\
    -f fail -l full -o /tmp/f10.dot 4 3

  Running time:
    real    0m5.438s
    user    0m5.088s
    sys     0m0.036s

  Size of flowtables: 26 to 144

  Number of states used: 4 (including initial)

  Correctness: spot-checked but not confirmed.
Pass switch number in to local from command line plus more instrumentation.

Conflicts:

	frenetic/katnetic.ml
Swap args incorrect order.
Add size function

(Partially cherry picked from b1a4866)
Add performance logging
added dump classic to katnetic
Refactor flowtable printing

Lift the flowtable printing code in Dump.Local into its own function,
and resue it in the other Dump.* modules.
Merge pull request #183 from frenetic-lang/frontend-refactor

Frontend refactor
Merge branch 'master' of https://github.com/frenetic-lang/frenetic
changed the initial cost of edges
Merge branch 'master' into experiments
Merge branch 'switches' into experiments
Print out dehopify time.
Build native binary.