WritableStream: Clear resolving functions

By making sure resolving functions are cleared on resolve/reject promises, we
can detect bugs.
Hmm. Are we sure this doesn't cause any behavior changes? It is surprising to me that we can remove these lines without any of the tests failing, so I am probably missing something.