testing, issue #1104: Make the test use static flags
Added version checker interface
inserted setUserAgent in each HTTP request
added APIVersion when call NewRegistry
Insert version checkers when call NewRegistry()
added client's kernel version
Removed an unnecessary error check.
Removed an unnecessary nil assignment
format in the user agent header should follow RFC 2616
reduce the number of string copy operations.
wip
Hack: use helper functions in tests for less copy-pasting
docker.upstart: avoid spawning a `sh` process

start script / end script create an intermediate sh process.
docker.upstart: use the same start/stop events as sshd

Is probably more solid
Merge branch 'master' into new_logs
store both logs in a same file, as JSON
Do not overwrite container volumes from config

Fixes #819 Use same persistent volume when a container is restarted
Testing, issue #1217: Add coverage testing into docker-ci
add legacy support
add debug and simplify docker logs