Closes issue #86 and issue #100

Fallback to using stdout, and, when both stdin
and stdout are *both* closed, catch ValueError
and use the same constants as when the attached
process is not a terminal.
add to changelog
Merge pull request #109 from pexpect/issue-86-and-100-stdin-closed

Closes issue #86 and issue #100