fix updateGroups background job for ldap servers with > 1000 groups

This adds a getAllGroups() method that uses a paged search if available.

Active Directory has a search limit of 1000 by default, so paged searches are needed to obtain all groups.
Without this patch, setups with more than 1000 groups won't work.