Remove Trailing Whitespace in User-Agent

After removed, the User-Agent shows in log like this:

[debug] http.go:160 https://index.docker.io/v1/repositories/busybox/images --
HEADERS: map[User-Agent:[docker/0.11.1-dev go/go1.2.2 git-commit/8887e00-dirty kernel/3.14.3-n1 os/linux arch/amd64]]

The code also moved all validation work into validVersion,
to keep the main logic as clean.

Docker-DCO-1.1-Signed-off-by: Derek <crq@kernel.org> (github: crquan)
gocapability: upstream fix for unsporrted caps

@vmarmol has made the fix upstream for not failing if the capability
being dropped is returned as invalid from the syscall, which is the case
when the capability is not supported on the host.
This is a blocker presently for RHEL6.5 on CAP_SYSLOG. We have patched
around this in our RPM for the time being, but this is the proper fix.

See also https://github.com/dotcloud/docker/pull/5810

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)
Make /proc writable, but not /proc/sys and /proc/sysrq-trigger

Some applications want to write to /proc. For instance:

docker run -it centos groupadd foo

Gives: groupadd: failure while writing changes to /etc/group

And strace reveals why:

open("/proc/self/task/13/attr/fscreate", O_RDWR) = -1 EROFS (Read-only file system)

I've looked at what other systems do, and systemd-nspawn makes /proc read-write
and /proc/sys readonly, while lxc allows "proc:mixed" which does the same,
plus it makes /proc/sysrq-trigger also readonly.

The later seems like a prudent idea, so we follows lxc proc:mixed.
Additionally we make /proc/irq and /proc/bus, as these seem to let
you control various hardware things.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Merge pull request #5869 from vbatts/vbatts-vendor-capabilities

gocapability: upstream fix for unsporrted caps
Merge pull request #5861 from crquan/fix-user-agent-trailing-space

Remove Trailing Whitespace in User-Agent
Merge pull request #5903 from alexlarsson/writable-proc

Make /proc writable, but not /proc/sys and /proc/sysrq-trigger
docs: add back build to remote api v1.10 & v1.11

This adds back the rm query parameter to the remote api docs for api
v1.10 and v1.11.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
bump remote api to 1.12 & add --force-rm to build

This adds a `--force-rm` flag to docker build which makes the Docker
daemon clean up all containers, even when the build has failed.

This new flag requires that we bump the remote API, so we also bump the
remote API version.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
integcli: add getContainerCount utility function

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
integcli: test container removal for failed builds

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
default to deleting images via the remote api

This makes the remote API version 1.12 and newer default to
automatically deleting intermediate containers when the build has
succeedeed.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
integcli: add tests for build --rm

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)