Fix segfault on hdb plugin creation

`cb_ctx->h` is not set before callback from `_krb5_plugin_run_f` resulting in segfault.
Some functionality of samba 4 is broken when built against recent checkout (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=732342).

Secondary commits are to fix the ldap as module (untested but builds) and compiler warnings.