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
Haha I see. This is a clever workaround to the `t.end()` thing. But thankfully you can use `t.plan(n)` instead so you can just do three separate `.then`s on different promises without chaining.

I will tidy this up while I merge.