Fixing a bug in WritableStream `[[error]]` algorithm and some bugs in the reference impl for it

Spec
- currentWritePromise must be cleared in `[[error]]`

Reference implementation
- resolver and rejecter for closedPromise must be included in the record
- need to get value to touch the record