sniff: improve handling of packet headers

Modify sniff to convert packet headers from records to a printable
representation. This allows dumping packets with an arbitrary number of
headers such as IPv6 packets with extension headers.

Add support for logging the full packet in hex or binary format:

    sniff:start([{filter, "ip6"}, {format, [hex,binary]}]).