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
Merge pull request #703 from anandpdoshi/anand-july-17

changed self.delete to self.delete_key in base_document and document