gltfpack: Optimize mesh merging
gltfpack: Optimize mesh merging

While our algorithm is still fundamentally N^2 (which may be fixed
later), we were scanning the mesh sequence twice - once, to identify
merge candidates, and the other time to actually merge.

The canMergeMeshes checks are pretty cheap but often meshes that are
merged are only merged within a relatively short window, so we now track
the last merged index and only iterate until that; this cuts merge time
~2x on some very large scenes.

zeux/meshoptimizer,zeux/meshoptimizer,zeux/meshoptimizer