netsniff-ng: Only use TPACKET_V3 if HAVE_TPACKET3 is defined

TPACKET_V3 is not defined if tpacket v3 is not available, thus make its
use conditional on HAVE_TPACKET3. Wrap the check for TPACKET_V3 in
ring_rx in an inline function which always returns false if
HAVE_TPACKET3 is not defined.

Reported-by: Mike Reeves <luke@geekempire.com>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
netsniff-ng: Clean up HAVE_TPACKET3 #ifdefs

Instead of having #ifdef HAVE_TPACKET3 spread all over the code,
encapsulate the functionality depending on it inside inline functions:
the existing is_tpacket_v3() introduced in commit 5bc19d0b84d0
("netsniff-ng: Only use TPACKET_V3 if HAVE_TPACKET3 is defined") and the
newly introduced get_ring_layout_size() to get the ring layout size
depending on the tpacket version available and the version actually in
use.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>