Delay abort() when the WritableStream is in closing state

Changed to use Promise.resolve(undefined).then(). Do you think we should put this in helpers.js?