vfs graphdriver: Make root dir mode 755

This matches the other backends.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
graphdriver: Add generic test framework for graph drivers

This adds daemon/graphdriver/graphtest/graphtest which has a few
generic tests for all graph drivers, and then uses these
from the btrs, devicemapper and vfs backends.

I've not yet added the aufs backend, because i can't test that here
atm. It should work though.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
graphdriver: Fail initialization if supported but got error

If a graphdriver fails initialization due to ErrNotSupported we ignore
that and keep trying the next. But if some driver has a different
error (for instance if you specified an unknown option for it) we fail
the daemon startup, printing the error, rather than falling back to an
unexected driver (typically vfs) which may not match what you have run
earlier.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
grapdriver: Skip tests on non-supported backends

For now this means the btrfs backend is skipped when run
inside make test. You can however run it manually if you want.

Docker-DCO-1.1-Signed-off-by: Alexander Larsson <alexl@redhat.com> (github: alexlarsson)
Added value format description for VOLUME instruction

In the documentation was not mentioned explicitly that VOLUME value
shoud be a valid JSON array. Because of this I spent time to discovering
the problem with my image where I put `VOLUME ['/data']` (with single quotes).
The `['/data']` mount point was parsed and mounted whole as a string without
any errors and warnings.

Docker-DCO-1.1-Signed-off-by: Max Shytikov <mshytikov@gmail.com> (github: mshytikov)
Merge pull request #5697 from mshytikov/fix/doc

Added value format description for VOLUME instruction in builder doc
Fixing pre-commit-msg URL

URL referred to raw.github.com instead of raw.githubusercontent.com. Fixed.

Docker-DCO-1.1-Signed-off-by: Aaron Huslage <huslage@gmail.com> (github: huslage)
remove addString and replace Tail

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Merge pull request #5686 from crosbymichael/cast-to-closer

Cast Input and Output to io.Closer
Merge pull request #5463 from tianon/hack-dind-cgroup

Update hack/dind to mount cgroups on "/cgroup" instead of "/sys/fs/cgroup" for better compatibility
returns an error when using -h and --net

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

returns an error when using -h and --net
fix event removal

Docker-DCO-1.1-Signed-off-by: Victor Vieux <vieux@docker.com> (github: vieux)
Fix stdin handling in engine.Sender and engine.Receiver

This introduces a superficial change to the Beam API:

* `beam.SendPipe` is renamed to the more accurate `beam.SendRPipe`
* `beam.SendWPipe` is introduced as a mirror to `SendRPipe`

There is no other change in the beam API.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Engine: fix a timeout bug in Sender/Receiver

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Engine: slightly more stress-testing of Receiver/Sender to reproduce the hang problem

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)
Merge pull request #5687 from shykes/pr_out_engine_fix_a_timeout_bug_in_sender_receiver
Engine: ensure all pipes are properly closed by Receiver and Sender

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)

[michael@docker.com: fix stdin closing in engine.Job.Run]
[michael@docker.com: fix fd leak in engine.Receiver.Run]
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-Tested-By: Solomon Hykes <solomon@docker.com>
Docker-Tested-by: Michael Crosby <michael@docker.com>
Merge pull request #5713 from shykes/pr_out_engine_ensure_all_pipes_are_properly_closed_by_receiver_and_sender
beam/data: Message.GetOne() returns the last value set at a key

This is a convenience for callers which are only interested in one value
per key. Similar to how HTTP headers allow multiple keys per value, but
are often used to store and retrieve only one value.

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: shykes)