stop RT from locking on "large" mails

Recent improvement in search for GnuPG encrypted/signed parts
introduced a deadlock situation. Happens on mail delivery with
GnuPG enabled and the mail containing a "large" quoted printable
or base64 encoded part. Size depends on OS and system
configuration. Symptoms: web server process hangs doing nothing,
rt-mailgate times out, no messages in logs.

It is incorrect use of pipe inside one process. After some ammount
of data, Writer just blocks waiting for reader to fetch it.

The commit in question is 258ec2fb531c83df00afae3f428975b9871e1f68
that was included into 3.8.15 and 4.0.8rc1.
make sure data is recorded (tests)
Work around a bug in perl < 5.13.10 with open($fh, ">:raw", \$string)

Perl versions 5.13.9 and earlier interact poorly with :raw and the
PerlIO layer which handles in-memory strings; this caused open($fh,
">:raw", \$string) to create a file on disk named "SCALAR(0xDEADBEEF)"
and "<:raw" to read a file on disk named similarly on such versions of
perl.

Change the two callsites which open in :raw mode on an in-memory string
to instead call binmode($fh, ":raw"), which works around this bug.
terge branch '3.8/gnupg-decrypt-verify-deadlock' into 3.8-trunk