Use buffer matching the C type of the "material_index" property in foreach_get to avoid having to iterate and cast every single element in the C foreach_getset function.
~5-6 times faster export of face material indices.
This patch makes no change to the exported file.