Ability to delete images.

* DB function to delete images
* helper that deletes image meta-data, image file and thumbnail file
* handler for deleting images
* wire up javascript for deleting images
* add javascript context so that app can run both standalone and inside
  application server