pkg/tarsum: add dynamic buffer sizing

This commit makes tarsum buffer allocation dynamic. This change
is required to avoid allocating memory excessively after the archive
buffering changes.

Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Merge pull request #7921 from unclejack/increase_tarsum_buffer_size

pkg/tarsum: make buffer size dynamic