net: hide tcpcb.t_state behind setters and getter

This will allow to insert tracepoint invocation in the setter which
will cover all occurrences of TCP control block state change.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
net: add tcp_state tracepoint

This tracepoint is invoked whenever TCP state is changed.

Example output:

  tcp_state     tp=0xffffc0003dbb6c00, 6 -> 9

There is no pretty-printer yet for state numbers, they can be decoded
using defines from tcp_fsm.h.

It's useful when tracing reaction of the stack on particular network
packets, when used together with net_packet* tracepoints and 'trace
list --tcpdump'. We can also get information from which code location
given state was changed, by enabling backtrace collection and using
-b[-L][-F] flags to 'trace list'.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
trace: cleanup packet tracing

The current tracepoint coverage does not handle all situations
well. In particular:

 * it does not cover link layer devices other than virtio-net. This
   change fixes that by tracing in more abstract layers.

 * it records incoming packets at enqueue time, whereas sometimes it's
   better to trace at handling time. This can be very useful when
   correlating TCP state changes with incoming packets. New tracepoint
   was introduced for that: net_packet_handling.

 * it does not record protocol of the buffer. For non-ethernet
   protocols we should set appropriate protocol type when
   reconstructing ethernet frame when dumping to PCAP.

We now have the following tracepoints:

 * net_packet_in - for incoming packets, enqueued or handled directly.

 * net_packet_out - for outgoing packets hitting link layer (not
   loopback).

 * net_packet_handling - for packets which have been queued and are
   now being handled.

Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>