Rename delay_cb()'s "w" argument to "watcher" for consistency.
Don't use "const" for "char *" strings that can be freed.
Fix ldap_search() double free crash when ldap_send() fails.

The internal buffers are already freed by ldapmessage_free().

Add an ldapmessage_empty() for freeing the contents of messages.