Finalize APIv2 for attachments

APIv2 handling of attachments has many improvements:
* rigorous access control on all methods
* inline display of downloaded files
* storage of MIME content type of uploaded files
* more robust error checking of chucked uploads
* ability to provide content in both the POST and PUT requests of a chunked
  upload, reducing the total number of required requests by 1
* much more efficient memory usage when uploading large non-chunked files
* efficient support for HTTP HEAD method for attachment metadata
* better support for HTTP caching for downloaded files
Add new attachment upload / delete button to session list
Remove jqueryupload module / blueprint

It is obsoleted by functionality in session view and API.
Update admin interface to use APIv2 attachment uploads and downloads

All attachments should be uploaded consistantly, so that MIME types are
always set.
Merge branch 'attachment-upload'

* attachment-upload:
  Update admin interface to use APIv2 attachment uploads and downloads
  Remove jqueryupload module / blueprint
  Add new attachment upload / delete button to session list
  Finalize APIv2 for attachments
Update the MultipleDatabaseModelDocument with a more stable implementation

The previous observer pattern was burdensome to maintain and may not have
covered all subclasses equally. It also had the potential for race
conditions in a multithreaded environment.

The new functionality has a more efficient caching of collections and fully
supports simultaneous requests.
Merge branch 'multiple_database_switch'

* multiple_database_switch:
  Update the MultipleDatabaseModelDocument with a more stable implementation
Clean some style
Remove pointless code

This does nothing, the actual protection is in the decorator. Not sure
why this was added in the first place.
Add restful URL endpoints to for 'tile' and 'thumb'

The existing query-string endpoints remain available for compatibility.
Raise a more specific error when tiles / thumbs not found
Import cStringIO for better performance when possible
Merge branch 'thumbnails'

* thumbnails:
  Import cStringIO for better performance when possible
  Raise a more specific error when tiles / thumbs not found
  Add restful URL endpoints to for 'tile' and 'thumb'
  Remove pointless code
  Clean some style