Add a test program for the open, close, and filter compile/set code paths.

This is to test for both libpcap bugs *and* Valgrind bugs; Valgrind on
OS X (and probably other systems using BPF) and Linux reports bogus
errors when setting a filter (because it blindly checks that the
*entire* bpf_program structure for BIOCSETF and the *entire* sock_fprog
structure for setsockopt(SOL_SOCKET, SO_ATTACH_FILTER) has been
initialized, rather than checking only the structure members and not the
padding, and *doesn't* check whether the program *pointed to* by that
structure has been initialized).  See

	https://bugs.kde.org/show_bug.cgi?id=312989

(I'll be filing a similar bug, with a similar patch to fix it, for
Valgrind-on-Linux).
Use raw ioctls or setsockopts to set the bad filters.

That guarantees that libpcap doesn't test the filter and decide the
kernel can't handle it, or attempt to fix it to work as a kernel filter,
and also avoids warnings from libpcap looking at the filter rather than
the system call looking at the filter.
Make the PCAP_DONT_INCLUDE_PCAP_BPF_H stuff BPF-only.

We don't need it on Linux and, in fact, it doesn't work on Linux, as
Linux doesn't define "struct bpf_program", libpcap does.
Fix tpo.
Oops, forgot to define USE_SOCKET_FILTERS on Linux.