Added regression test for #1340.

Child process must produce > 4096 bytes on STDERR (e.g., a large PHP backtrace).  For parity/completeness, do the same for STDIN and STDOUT.
Fixed #1340: Reading from STDOUT or STDERR hangs forever on Windows if the output is too large.

See https://bugs.php.net/bug.php?id=51800