Merge pull request #51 from spotify/rohan/ssl

Upgrade to Jersey 2.x
Fix Javadoc warning for PosixFileAttributeView

PosixFileAttributeView was referenced in the Javadoc, but
the class was not imported which caused this build warning:

warning - Tag @see: reference not found: PosixFileAttributeView#name()
Fix bug where dates are several days in the future

Docker returns timestamps with nanosecond precision (e.g.
2014-10-17T21:22:56.949763914Z), but the Date object only supports
milliseconds. Creating a Date from the nanosecond timestamp results
in the date being set to several days after what date should be.
This class converts the timestamp from nanoseconds to milliseconds
by removing the last six digits of the timestamp, so we can generate
a Date with the correct value (albeit with less precision).

Note: a more complete solution would be to introduce a custom date
type which can store the nanosecond value in an additional field, so
users can access the complete value. Or just use Java 8 which has
date objects with nanosecond support.
Merge pull request #50 from spotify/rculbertson/date-fix

Fix bug where dates are several days in the future
Merge pull request #54 from spotify/rculbertson/fix-javadoc-warning

Fix Javadoc warning for PosixFileAttributeView
Disable chunked encoding for container start

Don't send requests to start a container to Docker using chunked encoding.

This is to workaround a bug present in Docker 1.2.0, wherein the HostConfig
is completely ignored if sent with chunked encoding.

To enable testing this, we add ContainerInfo.hostConfig(), which returns
the HostConfig we get from inspecting the container.
Add SSL/TLS support

The DockerCertificates class can now be used to build an SSL context for
communicating with Docker over HTTPS with client/server authentication.
Ignore hostnames when verifying SSL certificates

We just make sure that the certificate is from the correct CA. Hostname
verification is pointless here since everyone is just using self-signed
certs anyway.
README: Document Unix & TLS support/usage
Run test-docker-ssl container in privileged mode

The test-docker-ssl container runs a Docker instance inside of it. We do
this to ensure we can connect to the instance using SSL.

In some configurations, the instance will fail to start unless it is run
in privileged mode, so now we account for that.

Also, we now check to make sure that the container started successfully
before continuing with the test.
Switch to CircleCI

* Add a CircleCI configuration file.
* Fix up some tests to work properly in their environment.

The primary motivator for this is that we cannot run any sizeable images in
the UML instance we have to use to run Docker in TravisCI. The test for the
new SSL functionality doesn't work with those restrictions.