Add new Events 'documents.created' and 'documents.updated'

FIX Close db connection in some tests