Fix compilation error on windows+msvc2013

- Some missing includes of <algorithms> in order to have
  stdd::min() and similar functions.
- Need to cast numIndices and numNVerts to int explicitly
  in order to solve warning treated as an error about
  precision loss.
- Can't do vector[0] for an empty vector, it'll generate
  a runtime range check error.
- MSVC only works fine with make_pair(foo, bar) syntax,
  without explicit template substitution here. Otherwise
  weird 'can't cast int to int&&' errors are happening.