Refactoring and improvements related to bundle functionality, part of #1181.
The bundle functionality is modularized, broken out into a new module
bundles.py, and CLI commands are introduced for import and exporting bundles. The settings are reorganized, and importing bundles through the api is by default disabled for now (previously, it was enabled by default). The bundle file format is essentially unchanged, except for renaming
export_settings for more consistency. Also made some improvements to related code, to make sure the GUI doesn't crash and that the user can always delete uploads where the import failed.
As before, importing is done by first creating a "skeleton upload" and then running a process (locally or on the worker) on this upload to do the main part of the work. Unlike before, the process is now focused on importing the parsed archive files, not reprocessing the raw files (reprocessing is still possible, but disabled by default).