HPCC-12249 Fix memory leaks in LDAPSecurity lib

ValGrind testing found some memory leaks in the LDAP Security manager. This
pull requests fixes as many as I could initially identify from testing. Specifically,
ldap_memfree needed to be called after every iteration of ldap_first/next_attribute,
and ber_free needed to be called after every call to ldap_get_values.

Signed-off-by: William Whitehead <william.whitehead@lexisnexis.com>
Its not clear from the docs, but I believe this is correct. The docs state "The array of values returned can be freed by calling ldap_value_free_len(). "    If there were no values in the array then I presume "values" would have been NULL (making the second condition of the "if (values && *values)" unnecessary but safe). I don't really have a way of knowing FOR SURE, but I did test it quite thoroughly and what used to fail now passes