simplify: Move more code into separate functions
simplify: Move more code into separate functions

In addition to just moving vertex id generation and cell counting into
separate functions, this change adds a function to fill cell data using
vertex ids and uses it in the reduce pass which is slightly faster.

We'll need to separately evaluate complexity vs performance tradeoffs in
this code, for now let's just clean everything up and make everything as
fast as possible.

zeux/meshoptimizer,zeux/meshoptimizer,zeux/meshoptimizer