Don't rely on events being sorted in ass_step_sub()

ass_step_sub() assumed that the subtitle event list was sorted by event
start time, but that is not guaranteed. Making the list sorted is not
an option. (At least for now - too many issues are in the way to get
such a change being done.) Fix this function so that it works with an
unsorted event list.

Semantics regarding corner cases might be slightly different, such as
what happens if the now parameter coincides with event start/end, or
behavior with overlapping subtitles.