feature #3159: map AD groups to ONE groups in ldap driver

Generates mapping file and returns a list of IDs of ONE mapped groups that
the user should belong.
Feature #3159: Core gets group IDs from external auth drivers
feature #3159: Added comments and replace rollback code
Merge branch 'feature-3159'