Fixing LDAP sync / hardening LDAPUtils.saveUser()

This commit aims to address 2 different problems:

- If an error occurs during LDAP sync or user's connection, the whole
  SQL transaction is aborted, so a first error, the whole process is
  discarded. Adding some checkpoints to be able to recover after an
  error (concerning user's connection, the error is related to adding a
  group into DB ; for the LDAP sync job, the error is related to
  removing a user who is still owning some metadatas).

- When a user connects a call is made to LDAPUtils.saveUser(), which
  tries to add groups if not existing. But groupId was potentially null,
  resulting of an Exception being thrown, and the user was not able to
  connect.

Runtime tested on a complete local copy of Aquitaine PIGMA production
environment.