.functions: Improve `targz`

* Only use `zopfli` when it’s available and if the `.tar` file is smaller than 50 MB.
* Use `pigz` instead of `gzip` when it’s available.
* Always exclude `.DS_Store` files when creating a tarball.

Closes #199.