Make sure init_decompression works for dive 0 as well

The loop would actually get entered for dive 0 and try to compare things
with dive -1. Which of course fails.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Correctly show the planned dive in the divelist

Previously we would simply show the first dive in the divelist - which
worked fine in the default sort by trip setting and assuming that there
are no dives from the future in the divelist.

With this commit we actually find the correct dive in the divelist and
select it instead. If you sort by depth you will see the dive move around
in the divelist, but it will stay selected and visible in the profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Scroll the divelist to show the planned dive

Just put the code to do so in a function and reuse that function elsewhere
as well.

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