fix [#34804] Only timeline_markers[0] is selectable if multiple markers at same frame

also add macros for looping on listbases as if they were circular lists which is handy for cycling over items.


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