Move find libarchive to top of build, so test can depend on libarchive
directly
Don't use deprecated functions for compression format
Use enum class for formats