Add support for fetching different types of compression of the pkg
package. It first tries to fetch pkg.txz (the original file), and if
unsuccessful, will try to fetch pkg.tzst, pkg.tbz, pkg.tgz, and pkg.tar
before failing.
Since the package extractor is compression-agnostic, only the code that
fetches the package was necessary to refactor.