Ticket #47455 - valgrind - value mem leaks, uninit mem usage

https://fedorahosted.org/389/ticket/47455
Reviewed by: nkinder (Thanks!)
Branch: master
Fix Description: The problem was that slapi_valueset_add_attr_valuearray_ext
was assuming the caller was going to free the entire given vs upon failure.
This is fine for the value replace case but not for the add 1 value case.
Callers of slapi_valueset_add_attr_valuearray_ext must provide
the dup_index parameter if using SLAPI_VALUE_FLAG_PASSIN and
SLAPI_VALUE_FLAG_DUPCHECK, and if there is more than one value.  The caller
needs to know which of the values from addvals is in vs to properly clean up
with no memory leaks.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
Ticket 411 - [RFE] mods optimizer

Description:  If there is a series of identical operations on the same attribute it takes
              much longer doing each mod seperately, as opposed to combining the values into
              one mod operation.  Optimizing this can only safely/efficiently be done to sequential
              ops of the same attribute and mod type.  Once the chain is broken, the optimization
              stops for that particular mod, and we start over on the next mod operation.

https://fedorahosted.org/389/ticket/411

Reviewed by: richm(Thanks!)
Ticket 47507 - automember rebuild task not working as expected

Bug Description:  If the basedn specified in the task is not beneath the automember scope,
                  the entry is skipped.

                  Example:
                           automember scope:  ou=people,dc=example,dc=com
                           task basedn:       dc=example,dc=com  --> using this dn will cause
                                                                     all the candidate entries
                                                                     to be skipped.

Fix Description:  Regardless what the task basedn is, the candidate entry dn needs to be
                  checked against the scope of the autommeber config.

https://fedorahosted.org/389/ticket/47507

Revewied by: nhosoi(Thanks!!)
Ticket 47502 - updates to ruv entry are written to retro changelog

Bug Description:  if replication and retro changelog are enabled
			the changes to the tombstone ruv are written
			to the retro changelog

Fix Description:   in replica_write_ruv this explicitely prevented by
			setting the OP_FLAG_TOMBSTONE_ENTRY - do this
			also in replica_replace_ruv_tombstone

https://fedorahosted.org/389/ticket/47502

Reviewed by: RichM
Fix regression from fix for 569, when the last value of an attribute was explicitely deleted
the attribute was not moved to the deleted attributes on a replication consumer