Refactor daemon.attach()

Also makes streamConfig Pipe methods not return error, since there was
no error for them to be able to return anyway.
I think that someone tried to rewrite it to `for err := range errors`.