Memory Leak Involving onload and onerror handlers in Image.cc

There appears to be a memory leak involving cleanup of the onload and onerror handlers in Image.cc.

From what my understanding of what the code does, is upon a successful load or error, the code invokes the applicable callback and deletes it.  It currently, however, doesn't delete the allocated handler for the other code path.  This leads to a propagation of orphaned onload/onerror c++ objects because they are not cleaned up in the destructor.

I'm not a very good c++ developer and could not get the deletes working in the Image destructor function, so I have inlined the deletes that prevent the memory leak from occurring.

The second commit addresses a fix for a memory leak in the jpegStream logic for canvas.  The processing code was not freeing up the buffer allocated to the write_to_jpeg_stream process.  The comment for the code that creates the buffer seems to hint that the buffer is intended to be reused; if that is the case, please change the submission to free the buffer at a more appropriate time.