Close the right end of a pipe on Win32.
Ajust some more tests for windows. #790. Gave up on pipe2 for now..