Documentation/refactoring.

refs #6232
Neated up one error's reporting.

refs #6232
Made on-demand finalization async.

refs #6232

Added logic so when finalization only is requested, it's performed
asynchronously. Added a field to the deposit to indicate when the
last attempt at finalization failed.
Post batch uploaded to em-iri.

refs #6232

Added the abiliy to, by setting the HTTP "Packaging" header to "METS",
POST METS XML to the edit media IRI to start async batch uploads.
Added error if finalizing incompete/failed SWORD deposit.
adding basic auth first draft to sword api

used when fetching files from a Fedora instance.
adding logging to basic auth
proof of concept
refs #6441
Added copying of METS into submission doc. dir.
Add optional extraction of filenames from METS.
Added status reporting for individual downloads.
Added Fedora credentials to space model/form.

Added Fedora host, username, password fields to spaces for
SWORD-related functionality.
Added optional use of Fedora auth creds for SWORD downloads.
Added ability to include checksums in METS url specifications.

Checksum type must be 'MD5'.
Update error handling

refs #5837

Move sword_error_response to helpers, update all references to point to
actual location.  Not all places calling currently have access to the
required request object.
Import all location.models

Will need access to all models, so import the whole module instead of
individual classes.
Add package description

Add description to packages, as a human-readable identifier.  Make
origin pipeline optional, as some packages (eg Transfers) may originate
from outside Archivematica.  Package path links to the Location it is
stored in.
Remove extraneous SWORD spaces

Do not create a SWORD space for each pipeline.  User should create and
configure these if they need SWORD support.
Remove FEDORA-specific attributes from generic models

refs #5796

Move fedora username/password/hostname to the FEDORA/SWORD specific
Space, instead of the common parent space.  Remove SWORD-specific
attributes from Package.  Add constants for FEDORA/SWORD deposits.
Associate deposits with Packages, collections with Locations

A deposit is more closely tied to a Package conceptually - a
file or collection of files to be moved around between Locations.
Locations are more associated with a purpose, and a logical grouping of
Packages.

Update resource endpoints to associate SWORD deposits with Packages,
and collections with Locations.  Move deposit related endpoints to
PackageResource, and pass a Package to the associated SWORD function.
Update DownloadTask & DownloadTaskFile to associate with Packages.
Update DownloadTask status function to return constants.
Update SWORD views & helpers for models changes

Update service document and GET/POST to collections, including all
dependent functions, for the Package and Locations changes.  Minor
refactoring, notably moving docstrings inside functions.
Update deposit from another Location

refs #5796

Add deposit finalization Package status, and set if finalization
successful.  Deposit from another location uses the same function as
ordinary deposits on finalization, and gets this change.  Do not
display finalized deposits in collection list.