Do not use ranged for in windows code.

It's not supported in VS2010, and VS2010 is still being used widely.
Update mocha to v1.16.2.
process.getgid is not available on Windows.