Followup to r60857: code was assuming markers were sorted, which is not guaranted. Also heavily simplified it (previous code was supposed to have optimizations, but ended just looping twice over the markers' list...).

Many thanks to Brecht and Sergey for noting the quirk and reviews! :)

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk@60880 954f8c5b-7b00-dc11-b283-0030488c597c