lib.xcsoar.analysis: fix flight detection algorithm

Add some fallbacks for failed flight / scoring window detection