Use build flags for daemon CLI code

Fixes #6256 and Homebrew/homebrew#29961 by separating the daemon CLI code for Linux and non-Linux systems (complains and bails on non-Linux if you try to pass `--daemon`). The file `docker/docker.go` was importing some packages that end up importing a Cgo file that includes a Linux-only header, so I moved the section that needs those packages into `docker/docker_linux.go`, and added dummy functions to `docker/docker_nonlinux.go` with `// +build !linux`. I also lifted the command-line flags to global variables in the `main` package so that they could be accessed by the functions inside `docker_linux.go`.

See also pull request #6309 for another approach, only compiling the Cgo file when on Linux.