Merge pull request #702 from anandpdoshi/anand-july-17

Data Import and Outgoing Email Settings
changed self.delete to self.delete_key in base_document and document

DocPerm has a field called 'delete'. This clashes with the function name.
Leads to this error:
self.delete("__in_insert")
TypeError: 'int' object is not callable