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>

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: jamtur01)
registry: adding vbatts to the MAINTAINERS

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: vbatts)

Docker-DCO-1.1-Signed-off-by: Vincent Batts <vbatts@redhat.com> (github: jamtur01)
Start separating the image subsystem

This is a first step towards moving all code related to local
manipulation of images into a cleanly separated subsystem,
accessible via a stable set of commands in the engine API.

`graph.TagStore` now implements `engine.Installer`. For now, it
is installed by `Server.InitServer`, along with all other Server
commands. However this will change in future patches.

`graph.TagStore.Install` registers the following commands:

* `image_set` creates a new image and stores it locally.
* `image_get` returns information about an image stored locally.
* `image_tag` assigns a new name and tag to an existing image.

These commands are a pre-requisite for moving 'push' and 'pull'
out of `Server`.

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

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: jamtur01)
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)

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: jamtur01)
Engine: Env.MultiMap, Env.InitMultiMap: import/export to other formats

* `Env.MultiMap` returns the contents of an Env as `map[string][]string`
* `Env.InitMultiMap` initializes the contents of an Env from a `map[string][]string`

This makes it easier to import and export an Env to other formats
(specifically `beam/data` messages)

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

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: jamtur01)
Engine: Receiver and Sender preserve Job.Env

When sending a new job to a `engine.Sender`, the corresponding
`engine.Receiver` will receive that job with its environment preserved.
Previously the job name, arguments and streams were preserved but the
env was lost.

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

Docker-DCO-1.1-Signed-off-by: Solomon Hykes <solomon@docker.com> (github: jamtur01)
Updated docker logs timestamp to RFC3339

Currently the docker logs timestamp flag generates log entries like:

    $ sudo docker logs -ft daemon_dave
    [May 10 13:06:17.934] hello world

It uses Go's StampMilli timestamp to generate the timestamp. The entry
is also wrapped in [ ].

It seems odd to have an essentially non-standard operational timestamp
and one that will require custom parsing.

Docker-DCO-1.1-Signed-off-by: James Turnbull <james@lovedthanlost.net> (github: jamtur01)