Add support for several backends.

The configuration is reloaded, then restored to the original config
so that we can use the ldap.Identity() code as it is.

Paches against bug/1190978