Add a buffered Writer between layer compression and layer upload
Add a buffered Writer between layer compression and layer upload

Without this buffering, the compressor was outputting 64 bytes at a
time to the HTTP stream, which was resulting in absurdly small chunk
sizes and a lot of extra overhead. The buffering restores the chunk size
to 32768 bytes, which matches the behavior with 1.8.2.

Times pushing to a local registry:

1.8.2: 0m18.934s
master: 0m20.564s
master+this commit: 0m17.593s

Fixes: #17038

Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>

circleci/docker,circleci/docker,circleci/docker,solanolabs/docker,makinacorpus/docker,makinacorpus/docker,solanolabs/docker,makinacorpus/docker,solanolabs/docker