Issue #19018: The heapq.merge() function no longer suppresses IndexError
#16042: CVE-2013-1752: Limit amount of data read by limiting the call to readline().

The SSLFakeFile.readline() method needs to support limiting readline() as
well.  It's not a full emulation of readline()'s signature, but this class
is only used by smtplib's code, so it doesn't have to be.

Modified version of original patch by Christian Heimes.
Null merge with 2.6
Close #18945: Add tests for tempfile name collision handling.

Patch by Vlad Shcherbina