s3m: Fix arrangement handling in update()
s3m: Fix arrangement handling in update()

The arrangement handling doesn't detect the end of a song if all
256 orders are used. Also a skip marker in the last used position,
two consecutive skip markers, or a bad pattern number in the order
list can cause OOB accesses.

Rewrite the handling so it works safely with all these edge cases.

adplug/adplug,adplug/adplug