Fixed a possible deadlock in WebConnectionStream

This patch fixes a possible deadlock that happens in WebConnectionStream.Close() when using a writeStream together with chunked transfer encoding under heavy system load.

Just in case this falls under the dual-licensed part:
I'd like to contribute this under the MIT X11 license.