fix for Mailpile blocking on gpg decryption

For very large encrypted mail, Mailpile is blocking endlessly on
decryption. This is due to the fact, that Mailpile first tries to pass
all data to gpg and only then starts reading output of gpg.

The problem is fixed by useing select to multiplex input/output to/from
gpg.
fix fd leak

close both sides of pipe opened with os.pipe()
Merge pull request #477 from EmilTh/master

fix for Mailpile blocking on gpg decryption (bug #434)