Obvious/canoe — pull request #19 by tylerneylon (2013-11-20 00:13:09+00:00)
Title: Use finish event to trigger the end of an upload.

Hello @evansolomon,

Please review the following commits I made in branch 'tyler-use-finish-event'.

f172ebcfff48fbd8ab68ef6794fa5205a124959a (2013-11-20 00:12:40 +0000)
Use finish event to trigger the end of an upload.
This drops use of the end() function to determine the end of incoming
data, replacing it with the node-api-generated finish event.

It also holds some write callbacks when further write calls will
definitely use more than the stream's threshold of memory. This allows
us to not manually emit the drain event, as the node api will do that
for us.

The complete event has been dropped in favor of the close event, which
is not documented officially but is recommended by isaacs and is used in
other places in the node api. We now let the node api trigger finish
first, to indicate that we've received all data; and we later trigger
the close event to indicate that all data has been received by S3,
including the upload completion call.Check list:

R=@evansolomon