resume pulling the layer on disconnect

This allows Docker to resume pulling a layer when it gets disconnected.

~~It depends on https://github.com/dotcloud/docker-registry/pull/348 and that should get merged first.~~ It has been merged and it's live on the index.

Fixes #2461
Fixes #6158