Improve logging of stream closing.
Closure reason and and error written into the transcript.
Check for multiple attempts to close the same connection, and guard against them.