pkg/archive: add interface for Untar

This PR modifies archive to make it possible to use alternative Untar implementations. This could be extended to other functions in the future.