Detect overwritten dive profiles
Detect overwritten dive profiles

The logbook entries are stored separately from the profile data. If the
profile ringbuffer is filled faster than the logbook ringbuffer, then
the oldest logbook entries can still point to profile data that has
already been overwritten with newer data.

To detect such overwritten profile data, we keep track of the remaining
space in the profile ringbuffer.

glance-/libdivecomputer,henrik242/libdivecomputer,glance-/libdivecomputer,henrik242/libdivecomputer