Use buffers matching the C types of the data in foreach_get to avoid having to iterate and cast every single element in the C foreach_getset function.
Get the edge index for each exported edge key and use this to map per-edge data, such as creases, to the exported edges.
~9-17 times faster for a minimal export (no loose edges, smoothing or creases exported)
~16-23 times faster for a maximal export with FACE smoothing (loose edges, face smoothing and creases exported)
~32-40 times faster for a maximal export with EDGE smoothing (loose edges, edge smoothing and creases exported)
Isolated parts:
~5-7 times faster loose edges processing
~2-4 times faster face smoothing export
~73-96 times faster edge smoothing export
~62-75 times faster creases export
In the rare case where there exist multiple edges with the same edge-key, this patch can result in a different export because the single edge exported from those multiple edges will have the per-edge data of the first found edge in loops. Before this patch, the per-edge data would be from whichever edge with the same edge-key was iterated last since it would overwrite the previously set per-edge data of the exported edge.