Added pcap_loop_sample() function.

Added a new api pcap_loop_sample(). It works as pcap_loop() except for a new parameter (n) that allows the callback function to be called every n packets.

This is useful if the handle function is heavy and can cause packet loss. One can run it on a sampling basis.