docker tarfile: report correct size of compressed layers
docker tarfile: report correct size of compressed layers

Tools like umoci will always compress layers, and in order to work
around some *lovely* issues with DiffIDs, tarfile.GetBlob would always
decompress them. However the BlobInfo returned from tarfile.GetBlob
would incorrectly give the size of the *compressed* layer because the
size caching code didn't actually check the layer size, resulting in
"skopeo copy" failing whenever sourcing umoci images.

As an aside, for some reason the oci: transport doesn't report errors
when the size is wrong...

Signed-off-by: Aleksa Sarai <asarai@suse.de>

(Updated primarily to handle closing the decompressed stream.)
Signed-off-by: Miloslav Trmač <9c008e38982a5397deb855345fb164f0558459ae@redhat.com>

containers/image,containers/image