Do not crash ldap backend on keyless principals

Operations like "kadmin -q 'addprinc -nokey foo'" or
"kadmin -q 'purgekeys -all foo'" result in principal entries with
no keys present, so krb5_encode_krbsecretkey() will just return
NULL.  Do not try to add the ldap "krbprincipalkey" attribute in
this case, as there are no keys to add and that call will dereference
the NULL pointer.

ticket: 8041 (new)
tags: pullup
target_version: 1.13.1
subject: kadmind with ldap backend crashes when putting keyless entries
Remove some dead code

The secretkey variable is initialized to NULL and compared against
NULL, but never actually set to anything after initialization.

Remove the variable and all code that would have executed if it
was non-NULL.