Added sequence numbers for packets

Allows us to detect missed packets and work out the order when reading
from the ring buffer.
Moved thread ID to event context in metadata description

This is to make it clearer that this field has the same meaning across
all event types.