Add bailout code to prevent infinite loop in deco calculation

This appears to happen if we have impossible dive sequences in the
dive_list (i.e., merging XML files from two different divers with
overlapping trips).

We need to fix the underlying cause for this issue (i.e., only pick the
'right' dives to calculate the residual tissue saturation), but at least
this code prevents the hang in an infinite loop.

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