delete on CMIS: do not delete "allVersions"

by default, on nuxeo-opencmis, "allVersions" argument is ignored.

Without these changes, deleting something in esup-filemanager makes it disappear in nuxeo.
With this commit + commit on nuxeo-opencmis below, deleting something "moves it to Trash", similar to deleting something nuxeo UI.

https://github.com/prigaux/nuxeo-chemistry/commit/8460bf4c9cb0c6085992e0f48d2914c7bd470f16 :

--- a/nuxeo-opencmis-impl/src/main/java/org/nuxeo/ecm/core/opencmis/impl/server/NuxeoCmisService.java
+++ b/nuxeo-opencmis-impl/src/main/java/org/nuxeo/ecm/core/opencmis/impl/server/NuxeoCmisService.java
@@ -765,7 +765,11 @@ public class NuxeoCmisService extends AbstractCmisService {
                 throw new CmisInvalidArgumentException("Not a folder: "
                         + folderId);
             }
-            coreSession.removeDocument(new IdRef(folderId));
+           if (allVersions) {
+               coreSession.removeDocument(new IdRef(folderId));
+           } else {
+               coreSession.followTransition(new IdRef(folderId), "delete");
+           }
             coreSession.save();
             // TODO returning null fails in opencmis 0.1.0 due to
             // org.apache.chemistry.opencmis.client.runtime.PersistentFolderImpl.deleteTree
@@ -1963,7 +1967,11 @@ public class NuxeoCmisService extends AbstractCmisService {
                             "Cannot delete non-empty folder: " + objectId);
                 }
             }
-            coreSession.removeDocument(doc.getRef());
+           if (allVersions) {
+               coreSession.removeDocument(doc.getRef());
+           } else {
+               coreSession.followTransition(doc.getRef(), "delete");
+           }
             coreSession.save();
         } catch (ClientException e) {
             throw new CmisRuntimeException(e.toString(), e);