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

https://fedorahosted.org/389/ticket/47455
Reviewed by: nkinder (Thanks!)
Branch: 389-ds-base-1.3.1
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
(cherry picked from commit 3adc242bcc8c6d0d05d5d9773f32b4f81afb6e6d)
bump version to 1.3.1.8
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!!)
(cherry picked from commit d2637ddddc73f66f8ad874a511b4880884d36950)