Fix issues with forking on Cygwin #1450
In most places OpenBLAS treats Cygwin as equivalent to Windows, and in most cases this is fine except when it comes to forking a process that's using OpenBLAS (since native Windows does not know about Cygwin's fork()).
In particular, the win32 threading module is broken after fork, and should be shut down before fork, so we must support adding a
What does not work around fork, is using the native Windows memory allocation functions on Cygwin, so this patch also changes memory allocation to use mmap on Cygwin instead.
Even if we're directly using the win32 threading driver and not pthreads, pthread_atfork still works fine to register a pre-fork handler, and is necessary to restore the threading server to a pre-initialized state.