method for generating new ddr-specific filenames

Files imported into DDR will be renamed in a regular pattern
that includes repo,org,cid,eid, and part of the file's SHA1 hash.
updating new-file view to use paths; added batch-add view
files page and forms now separate by role
more work on newfile view; empty celery tasks
implemented entity locking

The DDRLocalEntity.add_file() function will involve moving files
around and directly editing the entity.json file.  This change
adds an entity.locked bit, lock/unlock functions, and checks
for lock status in the relevent views.
DDRFile.__init__ and .from_entity; exif->xmp

The previous DDRFile.__init__ was too tied to loading as part
of the entity.from_json function.  The new __init__ makes it
easier to instantiate a DDRFile object when the files aren't yet
in the proper places in the filesystem.
make it easier to use ddrlocal.models.file.hash from other modules
added func for extracting XMP data from a file

NOTE: Uses Python XMP Toolkit, which returns a Python dict
rather than XML.  If we want to write XML to the METS file we'll
need to figure out how to do that or look for a different tool.
typechecking in entity dump_json
rm entity.filemeta log field
pull file.set_path out of file.__init__

When path is set, a couple other things happen: file.src and
file.basename are set based on value of file.path.
file.make_thumbnail function stub
a mostly-working entity.add_file method; rm from views

This belongs within ddrlocal rather than in webui.
Ultimately most of the work of this method will be farmed out
to Celery but we have to get it working *at all* first.
use MEDIA_BASE in ddrlocal,webui rather than storage.base_path()

- storage.base_path() ("/media/WD5000BMV-2/ddr") points to the
  actual filesystem path of the DDR repo, which is a USB HDD.
- settings.MEDIA_ROOT is "/var/www/media".
- settings.MEDIA_BASE ("/var/www/media/base") is a symlink to
  storage.base_path().
- settings.MEDIA_ROOT is not something that can be easily changed
  during runtime.  Nginx's "location /media/" is also not easily
  changed during runtime.

- When loading collections,entities, we have been using
  base_path() rather than MEDIA_ROOT.
- ddrlocal file manipulations have been outside the scope of
  Django so this looked OK.

- sorl.thumbnail has also been using base_path(), and uses
  Django's filesystem services.
- Django considers file manipulations that are NOT under MEDIA_ROOT
  to be suspicious, probably with good reason.

With this commit, ddrlocal and webui use settings.MEDIA_BASE
rather than storage.base_path().
can't write datetime objects directly to JSON
file.role comes from entity['files'] not entity['filemeta']
get file/filemeta fields from constant instead of hard-coding

Rather than cutting and pasting the fields from FILE and FILEMETA
(and hoping you remember them all), get the keys from constants
and load/dump programmatically.
DDRFile method for making a sorl thumbnail
adjustments to Entity.add_file(); added make_thumbnail
check for existence of thumbnail before trying to display

Some files are truly huge and some simply can't even be used
to generate thumbs.  By default, sorl attempts to make a thumbnail
every time until it succeeds.
The Entity.add_file() method marks whether it was possible to
generate a thumbnail during ingest and indicates whether or not
to even attempt to display a thumbnail.