api/common.go: code shared by the server and client implementation of the Docker remote api.

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

Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
Merge pull request #4313 from shykes/api-common

api/common.go