Add migrations

refs #6466

Enable South, and update version.  Add migrations for 0.2.2 and 0.3.0
for locations and administration.
Adding uninstall script and supporting proper updating

Refs #6359 #6466

Ubuntu package will now work when updating from 0.2.2 to 0.3.0.
Will also work when uninstalling 0.3.0
Add and display staging path

refs #6248

Staging path will be used in future to store files being transferred
from one Space to another.
Make moving files more generic

refs #6248

Add functions to move files/folders to and from the storage service.
Moving to the storage service from the original location deposits them
in a staging area associated with the destination Space.  Moving from
the storage service to the final destination moves the file from the
destination Space's staging area to the destination path.  The staging
area is locally accessible to the storage service, which makes the move
to/from storage service functions much simpler than trying to move to
any protocol space.

Each protocol space implements these functions, and the parent Space
calls them as needed.  Several protocol spaces have similar
requirements, so helper functions were placed in the Space class for
moving locally (using os.rename) and rsync.

Update store_aip to use the new functions.
Staging path in default Space

refs #6248

Add staging path to default Space.  Only set the default transfer
source and AIP storage paths if they're unset.
Rsync copies folders

Recursive option added to rsync command to copy folders properly.  Execute
permissions left alone, as directories that don't have execute bit don't
display permissions.
Extract file works for directories

Extract file requests will now check the filesystem to see if that path
exists in the package.  If not, and the package can be extracted, it will
fallback to the previous behaviour of extracting a file with the given path
and returning that.
Fix moving folders locally

Bugs moving folders locally using os.rename or shutil.move, so changed to
always use move_rsync until properly fixed.
post_move_from_storage_service takes set parameters

refs #6248

post_move_from_storage_service now expects the staging path (path relative
to the staging area for that Space), destination_path (path relative to the
Space.path for that Space) and package (optional, the Package that was
moved).
Add migration

Add migration for staging_path Space addition.
Move extraction from a package to the model

Refactored extracting a file from a package to the model, and added a
dependency on atool so it can handle more file formats.  Also, escape the
relative paths coming from the URL.
Add link to download pointer files

refs #5716

Add link to pointer files to Packages table.  Add download pointer file
URL.  Refactor extract and download request code to pull out the
section that returns a file stream, for use with the pointer file
downloads.
Added LOCKSS-o-matic stubs

refs #5425

Added a Space class for the LOCKSS-o-matic.  Functionality relating
to LOM on the changes to the METS file are stubs, since those
requirements not yet decided on.

Updated store AIP and download file functions to work with LOM, and
added a stub callback function for when LOM is done storing the file.
Added a new status for a package for when it is on the Storage Server,
but not yet in LOM.

Split chunks of an AIP are found at <aip_uuid>/download/<chunk_number>/
LOCKSS Space can parse service document

Add function to fetch and parse a service document, update the au_size and
collection_iri.

Added dependency on sword2 client library. Github version is newer and more
featureful than the version on PyPI. Install dependency from github.
Add common NSMAP

Add a common namespace map for use when working with METS and XML.
Update existing lxml code to use it. Add ipython as a development
dependency.
Create AtoM entry for AIP

refs #6009

Create the AtoM entry with the title, ID, agent, and description of the
AIP. Title, agent and description parsed from the METS file Dublin Core
title, description and an 'organization' agent.  Extract state IRI for
polling LOCKSS-o-matic from the deposit receipt.
Update LOCKSS-o-matic service doc and resource creation

refs #6009

Update LOCKSS handling of service document and atom entries to create
resources to match API changes.

Add checksumType parsing to service document.  Resource creation uses
lom:content tags, add checksum and checksum type to content tags.

Code moved to LOCKSS Space from Package, since it deals more with
Space-specific problems than Package.
LOCKSS WIP - edit & state IRI

refs #5425

Properly parse the edit and state IRIs from the deposit receipt.  Add sword
and Lockss-o-matic related namespaces to the namespace map.  Start on
polling for state, comments and logs where work needed.
Initial LOCKSS tests

Add pytest and pytest-django as testing dependencies.  Add testing fixtures
- initial data needed for everything, and a lockss-o-matic specific one.
Start on adding tests; currently only work if the modified simple sword
server is running.
Update for LOM changes

refs #5425

Update namespace for LOM, and make common.utils the only place it is
defined.  Add content provider ID, input by the user, and used to identify
the SS to LOM.