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.