cleanup of document detail

• make sure that the document is saved after d&d file upload, so all manually changed fields are saved correctly
• cleanup code in DocumentDetailWidgetModule and Document.php