Sort triangles during ta_parse. Use the same index as other polys. Store
results in rend_context.
Use primitive restart if available to avoid too many degenerate
triangles.
Update renderers.
Merging polygons in per-triangle can produces a large number of
degenerate triangles (up to x3), which must then be sorted, resulting in
a performance hit. This is useless since the sorted triangles are merged
after being sorted. (Regression introduced by
20d25059bf)
Issue #818
In per-strip mode, polygons are now sorted before creating the index and
merging. So it doesn't have to be done in the renderer anymore.