The solution is to draw all edited objects with an initial offset index for each object.
Thus there are no repeated indexes and it is possible to identify the base by ranges of indices.
- draw_object_select_id has been moved from view_3d_inter.h / drawobject.c to draw_manager.c.
- Circle Select and similar were not affected and therefore still ignore occlusion.
We can optimize a bit more on mixed selections by drawing all the selection elements within the same range of indices. But that may be for another patch.