libpcap doesn't directly support this, so this is implemented using the
Linux call fopencookie which rereoutes the read,write,seek,close functions.
*BSD seems to have something similar (funopen) which is not implemented in
this patch because I'm not familiar enough with BSD.
gzip detection for read is done by first directly opening the given file
like before. If this fails, we retry with gzip.
gzip detection for write is done by looking at the filename to write to.
If it ends in ".gz" we activate gzip compression.
This currently just works for the commandline option --output because only
there you get to set the filename suffix freely. To make this usable in
the curses gui, the save dialog would have to be extended to allow setting
a .pcap.gz filename extension.
gzip compression must be compiled in to be active. This is done with the
--with-zlib configure option.