Ark currently "load" an archive by using Archive *Archive::create() first and then ListJob *archive->list(). If an archive property is read *before* list() is called, the archive is listed in the background in listIfNotListed(). This design is broken a causes a lot or problems, the biggest being:
- The infamous loop of listjobs: T3296
- ark --batch --dialog huge-archive.tar.xz takes forever to show the extraction dialog, because the archive is listed in the background but BatchExtract doesn't (and can't) know it.
This diff basically changes ListJob into a new LoadJob. Archives are loaded by calling the static LoadJob *Archive::load(). The actual archive instance can be retrieve after the job has finished listing the archive.
We also introduces two new jobs (CreateJob and BatchExtractJob) to simplify the porting of addtoarchive.cpp and batchextract.cpp. The latter job does listing + extraction at once.
One small downside is the handling of non-existing archives, which we can't load. This is needed when we create a new archive from the Archive->New action. We need to be able to use the old Archive::create() in this case, but at least we can call it createEmpty() which is what actually happens.