Fix pcap_loop() with a count of 0 and TPACKET_V3.

A count of -1 *or* 0 should mean "loop forever", so only a count > 0
means to use the count to limit the number of packets to process.
Add a PACKET_COUNT_IS_UNLIMITED() to test for a packet count <= 0.

In read routines, a packet count <= 0 means "keep supplying packets
until you run out of packets in the buffer", and it means "keep supply
packets until the loop is broken out of or you get an error" in
pcap_loop().

Use the macro in all tests for that, so the right test is always done
(i.e., a count of 0 means "unlimited", not "supply zero packets"); this
fixes some cases where we weren't doing the right test (and hopefully
encourages programmers to use it and get the test right in new modules).
Fix builds on systems without TPACKET_V3.
Use HAVE_TPACKET3 rather than TPACKET_V3 to test for TPACKET_V3 support.

That's what's done in other places in the file.
Count *ring buffer blocks*, not *packets* to be filtered in userland.

We count the number of free blocks in the ring buffer, and calculate the
number of blocks in the ring buffer containing packets.  With TPACKET_V1
and TPACKET_V2, there's one packet per block, but, with TPACKET_V3,
there can be more than one packet per block, so we need to count blocks,
not packets, to decide when we no longer need to filter packets in
userland.

Don't overload the "filtering in kernel" flag to hold the count of
blocks; instead, have a "filter in userland" flag, indicating that we
have to filter packets in userland (whether that's because the filter
wasn't accepted by the kernel or because we need to deal with packets
that passed an earlier kernel filter but wouldn't have passed the new
kernel filter) and a count of blocks to filter in userland.

After counting the number of free blocks, if we find any, decrement that
count by 1, just in case some packet that had passed the old filter got
added to the ring after we counted the free blocks.  (For TPACKET_V1 and
TPACKET_V2, that would mark the block as no longer free, so the window
in which that could happen is narrower than for TPACKET_V3, where the
block might not be full and the timeout might not have expired, so it
could take some time before that block is handed to userland.)

Should fix GitHub issue #331.

(While we're at it, use the term "block" consistently for a fixed-length
item in the ring.)
Add capturetest.c to .gitignore.
Formatting tweak.
Add items for 1.5.1 and 1.5.2.
Tag some changes with a bug identifier.
Add post-1.5.2 bug fixes.

Also reformat some items, and give more details on one of the new-in-1.5
features.
address some minor issues with the manpages

Fix a reference in pcap.3pcap, fix typos in pcap-filter.manmisc and
manage pcap_tstamp_type_val_to_description.3pcap in the Makefile.
fix reference to pcap_tstamp_type_name_to_val()
fix a typo in man pages
remove libpcap's own CVS keywords

This change removes CVS keywords that express that the file belongs to
libpcap repository. All such keywords represented the revision and
timestamp by the end of 2008 or even older.
use CFLAGS during "make depend"

When libpcap doesn't compile unless configure'd with custom CFLAGS, the
custom value won't be used during [often implicit] "make depend", which
will then fail. Add the missing variable.
use both GCC and Clang in Travis CI
spaces
Added interfaces sorting function
Used pcap_add_if() to avoid double free error.
ISUP() and ISRUNNING() added.