Fixed download of images with mixed layer media types #253
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Support for zstd layers was introduced with commit 4d843dc, however the current implementation assumes that all layers in the image have the same media type (.layers[0].mediaType).
When importing images which have mixed layer types (e.g. gzip compression and zstd compression), this behavior causes layer extraction to fail, since layers with a type different from the first one are not pre-processed properly.
This PR addresses the issue by:
docker::_download_extractfunctiondocker::_download_extractfunctionThis is an alternative implementation to the one in #250.
This strategy removes the need to handle an array for media types in
docker::_download()(e.g. parsing from manifest, pruning out entries for cached layers, more complex call to GNU parallel), at the cost of storing the image manifest content in a string variable.