Send paths as base64 strings

Paths are basically bytestrings to the OS, and we've caused ourselves
a lot of grief by trying to treat them as sets of characters instead
of bytes. Legacy data can, and frequently does, contain data in non-
Unicode encodings, mixed encodings, invalid encodings, etc.

v2 of the API sidesteps this by treating all paths as sets
of arbitrary bytes, and communicates them to/from outside services in
base64-encoded strings. The v1 API remains available and returns paths
as strings like before.

refs #6067
File explorer: base64 decode directory names

This updates the file explorer to use the new v2 API, which requires
a new base64 JavaScript library. The library used comes from here:
https://code.google.com/p/javascriptbase64/

refs #6067
Accept AICs anywhere that AIPs work

refs #5803

Added an AIC package type.  Create, extract, delete and download AIP also
accepts an AIC. Renamed a 'file' variable to package to not conflict with
builtin. Removed temp dir once finished with it.
Package resource: expose under file name
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).
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 PLN Manager (LOCKSS) stubs

refs #5425

Added a Space class for the PLN Manager/LOCKSS.  Functionality relating to
the PLN manager 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 LOCKSS, and
added a stub callback function for when LOCKSS is done storing the file.
Added a new status for a package for when it is on the Storage Server, but
not yet in LOCKSS.
Rename PLN manager to LOCKSS-o-matic
Update LOCKSS-o-matic fields
Change LOCKSS download URL

refs #5425

Split chunks of an AIP are found at <aip_uuid>/download/<chunk_number>/
now, instead of the chunk number being passed as a GET parameter.
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.
Minor fixes

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

refs #6009

Create the AtoM entry with the title, ID, and description of the AIP.
Title and description parsed from the METS file Dublin Core title and
description.  Extract state IRI for polling LOCKSS-o-matic from the
deposit receipt.