Fix 'close' event behavior

This fixes things so we emit 'close' only when it's an unexpected thing. Otherwise
'end' or 'finish' indicates normal termination.

See http://nodejs.org/api/http.html#http_event_close_1
as well as http://nodejs.org/api/http.html#http_event_close_2