Fixes issue with s3/boto/gevent hanging.

Fixes the issue discussed in https://github.com/docker/docker-registry/issues/400 without functionality changes.