Add a unique id to every dive

This id is just held in memory. It's not supposed to be used for anything
but having a unique handle that represents a dive. Whenever you need to
remember a dive across an operation that might change the dive_table, this
is what you should hold on to, not a dive number, a dive pointer, or
anything like that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When merging dives, keep dive ids in mind

We try to do the most reasonable thing. If you have an existing dive and
merge a just downloaded dive with it - the you want the existing id.
If you merge two consecutive dives, then the start of the merged dive is
the earlier of those two dives so we keep that id.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Get rid of pointers to dive structures in the UI

The assumption that the pointer will keep pointing to a valid structure is
fundamentally flawed. And even if that is true today, it might change in
the future - just don't do it. Use the diveId instead.

The exception is when you own the structure and use it within one UI
interaction during which any way to change the dive_table is disabled
(e.g., while adding / editing a dive).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>