Set state running before dumping to disk

Fixes #4766
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)

Conflicts:
	daemon/container.go

Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: vieux)
Add a conditional to contrib/init/sysvinit-debian/docker for Dash vs Bash support

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)

Docker-DCO-1.1-Signed-off-by: Tianon Gravi <admwiggin@gmail.com> (github: vieux)
Always mark as stopped for non running containers
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: vieux)
Copy values out of hostConfig
Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: crosbymichael)

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@docker.com> (github: vieux)
Bump version to v1.1.2

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

Bump v1.1.2
Apply @jamtur01's copy edit's to certificates.md

Docker-DCO-1.1-Signed-off-by: Timothy <timothyhobbs@seznam.cz> (github: timthelion)
Enable `docker search` on private docker registry.
The cli interface works similar to other registry related commands:

  docker search foo

... searches for foo on the official hub

  docker search localhost:5000/foo

... does the same for the private reg at localhost:5000

Signed-off-by: Daniel Menet <membership@sontags.ch>
Fix error message on logging events

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Catch error on console creation

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Move declaration of DockerCli to top of file for readability

Signed-off-by: Solomon Hykes <solomon@docker.com>
Rename a method for clarity

Signed-off-by: Solomon Hykes <solomon@docker.com>
Fix log message on http handler error

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Expand hostname before passing it to NewRegistry()

Signed-off-by: Daniel Menet <membership@sontags.ch>
Test on container events

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Test on untag and delete events

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Merge pull request #7520 from LK4D4/more_events_test

More events test
Merge pull request #7499 from LK4D4/fix_events_error

Fix error message on logging events
Merge pull request #7509 from LK4D4/fix_http_handler_error_log

Fix log message on http handler error
Merge pull request #7502 from LK4D4/catch_error_console

Catch error on console creation