Testsuite: Added test of Stdio.Buffer()->_sprintf().
Testsuite: Fixed some state machine bugs in the SSL testsuite.

In some cases the when both the client and server have emptied their
send buffers, the last packet of data from the client may still be in
transit, so wait for all data to arrive at the server before closing
the server side of the connection.

Fixes issue with getting spurious truncated data in the SSL testsuite.

Also fixes bug where client->connect() detecting an expected
handshaking failure caused the threaded test to backtrace.
Protocols.LDAP: Corrected doc for client().
Image.ANY: fix use after free
Image.GIF: sanity check maxcode
Image.PNG: do length check before checking for IEND
Image.GIF: Fix leak

Cloning of Image objects can throw exceptions. Push the colortable to
the stack early, to prevent it from leaking in case of an error.