DRYing up creation of X-Registry-Auth header

Conflicts:
	image.go
Create tar stream for user with specified context dir
Removing support for go1.1
[TRIVIAL] removing extra comment line [ci skip]
Removing comment per feedback
Oops, adding to headers instead of reassigning
testing server: container naming handling
testing server: missing created timestamp at buildImage
add support for ssl connections
add import for crypto/tls
client: remove unnecessary else clause

Related to #170.
Close registered event listener channels when the client's event listener
receives an EOF.
Add ExtraHosts to HostConfig.
Merge pull request #172 from nitrous-io/extra-hosts

Add ExtraHosts to HostConfig
test server: add slash to the name of containers
Merge pull request #174 from mcuadros/master

test server: add slash to the name of containers
Allowing X-Registry-Config header to passed in via the environment
Merge remote-tracking branch 'origin/master' into provide-build-tar-stream-for-user

Conflicts:
	image.go
Adding tests related to building from a contextdir
Adding support for X-Registry-Config header (and corresponding test)