Fix prepend_err_str in LDAP KDB module

Use the oerr parameter to fetch the existing message.  Stop handling
oerr == 0, since no call sites were using it.  Free the old error
message before returning.
Note which release -x debug was added in