Platform specific methods of retrieving current thread id

Summary: already had apple/unix path for retrieving thread id
remove syscall include for windows and added
pthreads and windows threads specific versions of getting current thread id

All changes in ifdefs

Reviewed By: @jdelong

Differential Revision: D1458541
Increase stack size limit for cygwin

Summary: Default stack size limit for compiled code for windows is small
windows limits can only be set at compile time (or with some utils that alter pe files, but that's painful)
increase it to the minimum the application expects with the proper linker flag for cygwin

Reviewed By: @ptarjan

Differential Revision: D1458988