Remove some constants and use helpers instead

We have allot of helpers, use them instead of local variants.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make sure we keep our notion of what's selected in sync with the UI

When editing a dive, a group of dives or a trip we need to make sure that
we don't lose track of which dives and trips were selected. Otherwise we
might act on dives that DON'T appear selected in the UI but that we think
are still selected.

Fixes #304

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