Ticket 47620 - Fix logically dead code.

Coverity issues:  12419 & 12420

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

Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 080cb44f5eaa794375a8e69b6e1ac09fcae9a961)
Ticket 47627 - Fix replication logging

We printed the same CSN for the missing CSN and the supplier min CSN because
we reused the same CSN pointer.

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

Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 20cccf58108099cead2412a979e70e4f5972b806)
Ticket #47631 objectclass may, must lists skip rest of objectclass once first is found in sup

https://fedorahosted.org/389/ticket/47631
Reviewed by: nkinder (Thanks!)
Branch: 389-ds-base-1.3.2
Fix Description: Once a match is found, reset the found flag to 0 so that we
will keep looking for the next match.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 97cf45d236a8a333af2895b2bf04cc5940a14e37)
Ticket #47606 - replica init/bulk import errors should be more verbose

Description:
1. maxbersize: If the size of an entry is larger than the consumer's
   maxbersize, the following error used to be logged:
     Incoming BER Element was too long, max allowable is ### bytes.
     Change the nsslapd-maxbersize attribute in cn=config to increase.
   This message does not indicate how large the maxbersize needs to be.
   This patch adds the code to retrieve the failed ber size.
   Revised message:
     Incoming BER Element was @@@ bytes, max allowable is ### bytes.
	 Change the nsslapd-maxbersize attribute in cn=config to increase.
   Note: There is no lber API that returns the ber size if it fails to
   handle the ber.  This patch borrows the internal structure of ber
   and get the size.  This could be risky since the size or structure
   of the ber could be updated in the openldap/mozldap lber.
2. cache size: The bulk import depends upon the nsslapd-cachememsize
   value in the backend instance entry (e.g., cn=userRoot,cn=ldbm
   database,cn=plugins,cn=config).  If an entry size is larger than
   the cachememsize, the bulk import used to fail with this message:
     import userRoot: REASON: entry too large (@@@ bytes) for the
	 import buffer size (### bytes).  Try increasing nsslapd-
	 cachememsize.
   Also, the message follows the skipping entry message:
     import userRoot: WARNING: skipping entry "<DN>"
   but actually, it did NOT "skip" the entry and continue the bulk
   import, but it failed there and completely wiped out the backend
   database.
   This patch modifies the message as follows:
     import userRoot: REASON: entry too large (@@@ bytes) for the
	 effective import buffer size (### bytes). Try increasing nsslapd-
	 cachememsize for the backend instance "userRoot".
   and as the message mentions, it just skips the failed entry and
   continues the bulk import.
3. In repl5_tot_result_threadmain, when conn_read_result_ex returns
   non zero (non SUCCESS), it sets abort, but does not set any error
   code to rc (return code), which is not considered as "finished" in
   repl5_tot_waitfor_async_results and it contines waiting until the
   code reaches the max loop count (about 5 minutes).  This patch sets
   LDAP_CONNECT_ERROR to the return code along with setting abort, if
   conn_read_result_ex returns CONN_NOT_CONNECTED.  This makes the bulk
   import finishes quickly when it fails.

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

Reviewed by rmeggins@redhat.com (Thank you, Rich!!)
(cherry picked from commit 1119083d3d99993421609783efcb8962d78724fc)
Ticket 47620 - Fix dereferenced NULL pointer in agmtlist_modify_callback()

The server would dereference a NULL point if an attribute was deleted from a replication
agreement.

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

Reviewed by: rmeggins(Thanks!)
(cherry picked from commit 8baed897f504e75478b5dbbe736c1eaf6d2d7fa9)
Ticket 47620 - Fix missing left bracket

https://fedorahosted.org/389/ticket/47620
(cherry picked from commit 3a4d39e166449177c85b92af8b47c5c6848c4d02)
Ticket 47621 - v2 make referential integrity configuration more flexible

Bug Description:  Request to make entry scope multivalued and
			to define exclusion scope

Fix Description:  The fix makes the configuration parameters
	nsslapd-pluginEntryScope: <dn> multivalued and adds
	nsslapd-pluginExcludeEntryScope: <dn>

	The logic implemented is specified in:
		http://port389.org/wiki/Configuring_scope_for_referential_integrity_plugin

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

Reviewed by:  richm, thanks
(cherry picked from commit 16dc94f11e644e8829817489e92f814757058b82)
Bump version to 1.3.2.9
Ticket #47645 reset stack, op fields to NULL - clean up stacks at shutdown - free unused plugin config entries

https://fedorahosted.org/389/ticket/47645
Reviewed by: nhosoi (Thanks!)
Branch: 389-ds-base-1.3.2
Fix Description: description
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit c5e9bd7acc8b3fef57ee040b43217e9ba04410e7)
Ticket #47634 support AttributeTypeDescription USAGE userApplications distributedOperation dSAOperation

https://fedorahosted.org/389/ticket/47634
Reviewed by: nhosoi (Thanks!)
Branch: 389-ds-base-1.3.2
Fix Description: When reading schema, flag the attribute as distributedOperation
or dSAOperation.  When writing schema, make sure the USAGE is specified
correctly based on the flag.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit ee7565f846bbae008d9d71c80ca0db0c33fdc384)
Ticket #47647 remove bogus definition in 60rfc3712.ldif

https://fedorahosted.org/389/ticket/47647
Reviewed by: nhosoi (Thanks!)
Branch: 389-ds-base-1.3.2
Fix Description: Remove the bogus schema definition.  Add 60rfc3712.ldif to
the schema upgrade script.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 2d4dc977f64615afcdc1ebbed47a85a7079e6072)