Follow up to 443edc8d.  Handle search correctly when it should terminate at
the end of the range.  Refactor cue position loop into
ne_find_cue_position_for_track.