When creating a container, set Attach* attributes according to detach and stdin_open arguments

Following the [official Docker CLI's logic](https://github.com/dotcloud/docker/blob/master/container.go#L163-L171).