XWIKI-7936: When you import a page, that have no attachment and overwrite an existing page containing attachments, some errors appear with them.

* The attachments of the previous version were not added in the new version, meanwhile they were still existing in the database.
* It happens when you import the document as a new version.
XWIKI-7936: When you import a page, that have no attachment and overwrite an existing page containing attachments, some errors appear with them.

* We remove from the database all attachments that are not in the new version of the document.
XWIKI-7936: When you import a page, that have no attachment and overwrite an existing page containing attachments, some errors appear with them.

* Can't use list.contains because XWikiAttachment does not have an equals() method.
Merge pull request #170 from gdelhumeau/XWIKI-7936

XWIKI-7936: When you import a page, that have no attachment and overwrit...