lava: Fix filtering of groups
Make the LAVA backend:
- filter out groups that should be excluded from the claim
- leave unmanaged groups on the LAVA side unchanged
In particular 2 is needed for a smooth transition. Currently permissions are managed with manually created groups, removing people from there before the managed groups have been set up would make people very, very, very annoyed.
This also adds some unit tests since they were completely missing before, and they helped me catching some other issues.
Edited by Emanuele Aina