propagate errors write

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Merge pull request #5613 from vieux/better_error_handling

propagate errors write
Move Attach from container to daemon

This moves the Attach method from the container to the daemon.  This
method mostly supports the http attach logic and does not have anything
to do with the running of a container.
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Merge pull request #5614 from crosbymichael/move-attach-to-daemon

Move Attach from container to daemon