core - issue in calculating hasEditPermission

Currently, the ORM translation of the SQL query that is made to the
database to check whether a user can edit a MD or not (depending on
which group he belongs to) is the following:

"SELECT
  ...
FROM
  ...
WHERE
  user is EDITOR
AND
  userID = id
AND
  groupID = x AND groupID = y AND groupID = z ..."

The correct request that has to be made should end up with
"[...]
AND
  groupID IN (x,y,z,...)"
instead.

The following patch implements this "IN / OR" logic.
Tested manually, but please review.
> I'm not a JPA expert, maybe it was making sense to get only one result before ?

If a record, is editable by two or more groups of a user, then we'll get more than one. See how it was in 2.10.x : https://github.com/geonetwork/core-geonetwork/blob/2.10.x/web/src/main/java/org/fao/geonet/kernel/AccessManager.java#L488