improve docker parallel pull

Smarter parallel pull, depending on the repo,
it'll download either the TopLevel images or the Ancestry images in parallel:

If there is only one TopLevel image in the repo (ex: `samalba/hipache`) the download of the ancestry will be parallel
If there re multiple TopLevel images in the repo (ex: `tianon/debian`) and we ask for all tags, the download of those TopLevel images will be parallel
If there are multiple TopLevel images in the repo (ex: `tianon/debian`) and we ask for one particular tag, the download of the ancestry will be parallel

Also added a `Close()` in `WriteFlusher` to prevent race conditions

@mhennings, can you take a look ?