Trac Ticket #298 - crash when replicating orphaned tombstone entry
https://fedorahosted.org/389/ticket/298
Fix description:
1. The cause of the crash was freeing a to-be-added entry in
tombstone_to_glue although the entry is consumed in
slapi_add_entry_internal_set_pb/slapi_add_internal_pb.
This patch removes the redundant slapi_entry_free from
tombstone_to_glue.
2. Introducing is_suffix_dn_ext to pass is_tombstone flag
for getting the proper parent sdn of a tombstoned entry.
3. Logic handling ancestor tombstone was broken.
In _entryrdn_insert_key, if _entryrdn_get_tombstone_elem finds
a child node, it was checking if the node is a tombstone or
not immediately. It should have been done in the next loop.
4. Reducing repeated "WARNING: bad entry: ID ##" messages.
(cherry picked from commit 2e5ee4d10c24f7d102fc7461f23f77ac631dc507)