Add capability to recycle objects to class.lua

The creation of instance objects should be avoided in packet
processing loops to reduce garbage collection overhead.  class.lua now
supports a simple mechanism where an app can declare an object to no
longer be in use.  This object is then put on a list in the
corresponding class and will be re-used by the constructor method
instead of allocating a new object.

The class API has been changed slightly to no longer require the
declaration of constructor methods.  Any method can act as a
constructor or extend the standard constructor by calling the new()
method of the super class.
Adapt lib/protocol and apps/vpn to the new class.lua semantics

Also includes some minor bug fixes here and there.
Fix bug in ipv6:ntop()

The conversion from numeric to printable for ipv6 addresses was
seriously broken.  The fix includes a redefinition of the source and
destination address in the ipv6 header as uint8_t.
Add a simple interface to libpcap's packet filter

lib/pcap/filter.lua provides a facility to compile an arbitrary
libpcap filter expression and apply it to a data packet for efficient
classification.
Add functionality to the datagram module

The new method parse_match() allows the parsing and matching of a
single protocol header without having to allocate a table, which can
help to avoid garbage.

The new method parse_n() parses exactly n protocol headers without
applying any additional checks.

Also new is the pop_raw() method that pops a protocol header without
parsing it.  This requires the application to already know the type
and size of the next header.
Add support for the new pcap filter module to vpws and ns_responder

Both apps use the efficient filter module to avoid garbage during
packet classification.
Fix a bug in the checksum algorithm of core/lib.lua
Full support for GRE and ICMPv6 checksum

The vpws and ns_responder apps now handle checksums correctly in all cases.

The GRE key field is now supported correctly as well.
Added selftest for vpws app
Fix initialization bug in buffer.new_buffer()

The origin.type member of a newly allocated buffer needs to be set
explicitely after receiving a memory block with undefined contents
from malloc(3).
Tunings to reduce garbage and eliminate NYIs

lib/protocol/datagram.lua: pre-allocate the _packet variable upon
instantiation as ctype "struct packet *[1]" to avoid boxing.  This
appears to eliminate the bulk of garbage in the datagram class.

lib/protocol/icmp/: pre-define pointer ctypes in various classes to
avoid NYIs due to unsupported FastFunc ffi.typeof.

lib/protocol/ipv6.lua: pre-allocate a pseudo-header for every ipv6
object to avoid another NYI.

lib/protocol/header.lua and all module that touch the _header instance
variable: create _header as array of a single pointer to the actual
header, just like in datagram.lua.  The cast operation in
new_from_mem() will update the array rather than create a new boxed
pointer.
Use lib.bitfield in ICMPv6 neighbor advertisement module
Use a better way to deal with variable-size protocol headers

A previous commit that reduces garbage in the lib/protocol code broke
the handling of variable-sized protocol headers, specifically gre.
The gre code and the generic code in lib/protocol/header.lua has bee
rewritten to use subclasses in such a case.  This makes the code
cleaner and allows proper recycling of objects on a per header-type
basis.
Merge branch 'vpn-performancev2' from Alex Gall.
Replace compile-time '-lpcap' with runtime 'ffi.load("pcap",true)'

Libpcap will be dynamically found and linked at runtime if/when the
lib.pcap.filter module is loaded.
Merge pull request #221 from lukego/merge-vpn-performancev2

Merge vpn performancev2