More configurable upload widget

- Allow it to be embedded without a modal dialog
- Add hooks for file selection and pre-upload
Use jade mixins to avoid duplication between upload widget templates
Add javascript documentation for the upload widget config options
Add a test for the nonstandard upload dialog options
Merge pull request #563 from girder/upload-widget-flexibility

More configurable upload widget