Change unused WriteCloser to Writer

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Close logs pipes and catch write errors

Signed-off-by: Alexandr Morozov <lk4d4@docker.com>
Merge pull request #8159 from LK4D4/fix_goroutine_leak_in_logs

Fix goroutine leak in logs following