dup2: clarify by coalescing Windows-specific material
* lib/dup2.c: Move '#include "msvc-inval.h"' and '#include
"msvc-nothrow.h"' to the Windows-specific section, so that the
Emacs source need not contain these include files.
(ms_windows_dup2): Rename from dup2_nothrow, and move all the
Windows-specific fixes into this function rather than just the
nothrow fix, as this shortens and clarifies the code. Always
define as a function, as that's a bit cleaner than having it be
sometimes a function and sometimes a macro.
(rpl_dup2): Move the Windows-specific stuff out of here and into
ms_windows_dup2. Don't protect the Haiku-related fix with
"#if !defined __linux__", as the same code also works around
a Linux kernel bug, and it doesn't add any system calls on any
platform. Add comment about FreeBSD 6.1.