Implement memoization in cfkey.

This patch fixes issues #26.
Improve syntax errors when parsing pflang

This patch fixes issue #25.
Fix cannot locate function 'compile_filter'.

* Renamed script 'pc_pcap_asm' to 'bpf-to-asm'.
* Added usage information to 'bpf-to-asm'.
* Move script to dir 'utils/'.
Merge pull request #33 from Igalia/cannot-locate-function-compile_filter

Fix cannot locate function 'compile_filter'.
Merge pull request #26 from Igalia/issue-26-fix-cfkey

Fix n² complexity in cfkey
Preserve uint32 range in arithmetic ops

* src/pf/codegen.lua (read_buffer_word_by_type): Load words as uint32,
  not int32.
* src/pf/expand.lua (expand_arith): Add mod-32 around arithmetic ops
  that can produce out-of-uint32-range values.
Fix codegen scoping bug

* src/pf/codegen.lua (compile_bool): Wrap true continuation in a do /
  end in all cases, to preserve scoping.
Range inference over all arithmetic exps can remove modulos

* src/pf/expand.lua: Add assertion to / and % that RHS is not 0.

* src/pf/optimize.lua (binops): Remove || and &&; they are not present.
  (Range): New helper class.
  (infer_ranges): Infer ranges for all kinds of arithmetic expressions,
  not just packet access.  Elide unneeded modulo expressions.
Merge branch 'uint32'
Add BPF disassembler, fix BPF compilation bug

* src/pf/bpf.lua (disassemble): New function.
  (compile_lua): Print BPF disassembly in verbose mode.  Fix BPF_TAX
  instruction (!).
Merge pull request #25 from Igalia/issue-25-improve-syntax-errors

Improve syntax errors when parsing pflang
Merge pull request #37 from Igalia/disassemble-bpf

Add BPF disassembler, fix BPF compilation bug
Added script for generating BPF asm and Lua code generated by libpcap and pflua.

- Generate BPF.

        $ pflang-compile --bpf "tcp port 80"

- Generate libpcap Lua code.

        $ pflang-compile --lua "tcp port 80"

- Generate pflua Lua code.

        $ pflang-compile --pflua "tcp port 80"

The flags are not exclusive, they can be combined to get several outputs
at the same time.

Some code reorganization within 'tools/' folder.
Merge pull request #38 from Igalia/compilation-script-to-lua

Added script for generating BPF asm and Lua code (libpcap and pflua)
Add pflang.md

* doc/pflang.md: New document.
Update pflang.md

Fix a couple markdown errors.
Add pflua-filter tool.

* src/pf/savefile.lua: Add open_and_mmap helper.
* src/pf/utils.lua: Add now() helper.
* tools/pflua-filter: New tool.
Add tests for pflua-filter

* tools/pflua-filter: Add a shebang line, and chmod +x.

* tools/Makefile: Simple "make check" target.

* Makefile: Visit tools/Makefile as appropriate.
Merge pull request #42 from Igalia/pflua-filter-check

Add tests for pflua-filter
Fix bugs around wrong argument to gettimeofday, pcap_offline_filter

* src/pf.lua: Create a pcap_pkthdr instead of a pcap_record.  They're
  different on 64-bit systems...

* src/pf/libpcap.lua: Update pcap_offline_filter prototype and selftest
  message.

* src/pf/savefile.lua: Remove struct pcap_record_extra, as it's not
  used.

* src/pf/types.lua: Add pcap_pkthdr.

* src/pf/utils.lua: Fix suseconds_t type (!).