Write tests to check leaked connections

Write tests that check we aren't leaking connections
from DockerClient's pull, build, and push methods.