lavf/hlsenc: fix bogus hls segment index rewrapping logic

The counter should not be reset since it detects the
hls segment increasing timeframe.

Fixes ticket #2643.

Reviewed-by: Stefano Sabatini