This is a squash rebase of the following individual commits for easier merging:
Initial sketch of tagging thinned messages to reduce generating extra gaps in port
Revert formatting changes to thin_port_visits_pipeline to minimize PR footprint
Needed to incorporate possible_gap_end into gap_start as well as end, which means not using it for last state. Also fix bug where we forgot to inherit from NamedTuple
Set the first message of the day to be a possible gap; be more careful to only emit one item for each message
Improve labelling of events inside port visits, often which had incorrect seg_id. Also clean up section that wasn't causing an issue, but was confusing and would likely lead to some bugs later
Relates to https://globalfishingwatch.atlassian.net/browse/PIPELINE-1845
This is a squash rebase of the following individual commits for easier merging: