properly close tcp/websocket-forwarded connections

Previous code seemed to assume io.Copy would return an error on EOF, but
really it just returns, as it's done copying.

[finishes #54626750]