XWIKI-8930: Deleting an attachment should send an event
* also apply the same logic to XWikiDocument#saveAttachmentContent
(cherry picked from commit db9ef0b9cbe38210be863844d70ce8d2a86772b1)