Additional flexibility for user- and group management.

I added some new settings to control binding a user to a DN and resolving its groups to make this plugin work on our setup. Where possible, I tried to stay as close to the original code style as possible.