Emit an end event when the stream closes, so piped to streams can emit theirs