decapsulate/decode: re-work packet decapsulation

Add decapsulate/2 and decode/1,2.

The arity-2 functions allow the caller to specify the protocol type. For
example:

    pkt:decode(icmp6, Bin)

Will decode the data as an ICMP6 packet (the default is ethernet).

decapsulate/1,2 is used when the caller is only concerned with the
"happy" case. It will crash if the packet is invalid. The caller can
catch the crash.

If the caller does not want to crash and wants the contents of what has
been so far decoded, they can use decode/1,2:

    case pkt:decode(en10mb, Bin) of
        {ok, [#ether{}, #ipv4{saddr = Saddr}, #tcp{sport = Sport}, Payload]} ->
            {{Saddr, Sport}, Payload};
        {error, [#ether{}, #ipv4{saddr = Saddr}], {tcp, Payload}} ->
            % if the TCP header was invalid
            {error, {Saddr, Payload}}
    end.

decode/1,2 is likely slower than decapsulate/1,2.