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).
Add backlog purpose

refs #6131
POST to Location moves files

refs #6131

POST to a Location with information about the source location and the paths
of the files to be moved, copies the listed files from the linked Location
to the Location POSTed to.  Directories are created with 775 permissions
instead of 755.
Add default backlog location

refs #6131

Add config option and default values for a default transfer backlog location.
Allow backlog transfers to be stored

refs #6131

Add support for storing a transfer in a backlog Location when a Package is
created.  Add checks to ensure packages only go to the correct Location's
purpose (ie AIPs go to AIP storage, transfer to transfer backlog). Refactor
store AIP code to share some in common with backlog transfer.  Expect AIP
storage origin_path's to be relative to the Location.
Transfers can be deleted from backlog
Fix moving directories

Moving directories caused the directory to be nested inside itself.  To fix
that, when moving from staging to Space, terminate all directories with /
to make rsync happier.

Move all path pre-processing to Space.move_from_storage_service instead of
duplicating in each child space.
Delete backlogged transfers

refs #6131

Delete folders as well as files correctly.  Don't try to delete pointer
files if they don't exist.