Apply codestyle
XWIKI-8930: Deleting an attachment should send an event
* don't save the document when removing an attachment with merge
* fix tests