Ticket #47347 - Simple paged results should support async search

Bug description: Simple paged results serialized the request
even for a series of asynchronous search requests, and it
returned error 53 (unwilling to perform) if the second request
comes in while the first one is being processed.

Fix description: This patch implements the asynchronous support
for the Simple paged results search.
- Removed pagedresults_check_or_set_processing which was
  used to Simple paged results requests exclusive.  Instead,
  pagedresults_lock is introduced to protect the PagedResults
  object from the other threads sharing the same cookie.
- If any error including hitting the sizelimit or timelimit,
  search result set was released immediately in ldbm_back_
  next_search_entry_ext, which could cause the race condition
  among multiple asynchronous search requests.  To prevent it,
  the search result set is untouched if the operation is a
  Simple paged result search, and let its clean up function
  to handle it.
- Sizelimit was evaluated in the accumulative way instead of
  on the each page size.  For instance, if the sizelimit was
  101 AND the page size is 100, as soon as getting the 2nd page,
  it hit the sizelimit and the search failed.  This patch fixes
  it so that as long as the requested page size is less than 101,
  the requests successfully continue without getting an error 4
  (LDAP_SIZELIMIT_EXCEEDED).  To fulfill the requirement, the
  current size needs to be managed per operation instead of the
  search result set or PagedResults object. For the purpose,
  introduced o_pagedresults_sizelimit to Slapi_Operation.
- When shutting down, connection_table_free could use backend
  callback (e.g., be_search_results_release). Therefore, moved
  be_cleanupall after connection_table_free.
- Each Simple paged results helper functions checks if the
  operation is really a Simple paged result request control is
  associated with to prevent any unexpected behaviour.

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

Reviewed by Rich (Thank you!!)
Ticket #529 - dn normalization must handle multiple space characters in attributes

Bug Description: Commit 69ff83598d517bed84922b1c7dd67cab023b4d99
had a flaw -- handling normdn in upgradedn_producer had a
problem.  The string was passed to the Slapi_DN in the entry
using slapi_sdn_init_dn_passin, while the string could be
modified at other places.

Fix Description: This patch manages the normdn string more
carefully.

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

Reviewed by Rich (Thank you!!)
Ticket 153 - use openldap's schema parser

        Bug Description:  After running ol-schema-migrate.pl(which converts openldap schema to
                          389 DS schema format), 389 still doesn't parse the schema correctly as
                          it expects the syntax to be in a certain order.

        Fix Description:  First, instead of only recording the "X-ORIGIN" values, I have created a
                          linked list for all the schema extensions, not just "X-ORIGIN".  Then on
                          systems that have openldap, we use the openldap schema parser.  On
                          systems that only have mozldap, we use the old parser.

                          Also did some code cleanup.

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

        Reviewed by: richm(Thanks!)
Ticket 47299 - fix config file and server id processing

        Bug Description:  get_init_file() was not returning the config file, normalize_server_id()
                          was not properly extracting the server ID, get_server_id() was not
                          returning the default instance and need to remove the newline character
                          from the CONFIG_DIR value, and fixed some wrong variable names.

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

        Reviewed by: richm(Thanks!)
Ticket #47320 - put conn on work_q not poll list if conn has buffered more_data

Description: Additional change to
  commit ed88c40218c3fb8944618927e7865d74bc922c02
to fix the self-deadlock.
Replacing bind_credentials_set with bind_credentials_set_nolock
in handle_handshake_done.  The handle_handshake_done is only
called from connection_read_operation, where lock on c_mutex
is already obtained.  Thus, the replacement is safe.

https://fedorahosted.org/389/ticket/47320
Ticket 47331 - Self entry access ACI not working properly

Description: Additional change to
  commit 79346deb255ca8d7889d7590534d308d4e3a78da
which added a macro ACLPB_CACHE_RESULT_PER_ENTRY_SKIP, but
ACLPB_STATE_ALL was not updated to cover the bit.
This patch updates ACLPB_STATE_ALL to support the new bit.
Ticket #529 - dn normalization must handle multiple space characters in attributes

Fix Description: Fixing a 2 compiler warnings introduced by commit
a68952f9a8e6d3ff9fea1b4b485acc63f77b3ce6.

https://fedorahosted.org/389/ticket/529
Coverity fix -- 13164: Logically dead code

Bug description: commit 1cbd6d84dd0871af4955ebf93693e8b4331ab07e
for Ticket 47325 - Crash at shutdown on a replica agreement
introduced '13164: Logically dead code'.

Fix description: Since bind_timeout never be NULL, no need to
do NULL check.  Eliminated the dead code.

https://fedorahosted.org/389/ticket/47325
Ticket #47343 - 389-ds-base: Does not support aarch64 in f19 and rawhide

Fix description: Reran autoconf (autoconf-2.69-3.fc18.noarch)
on Fedora 18.

https://fedorahosted.org/389/ticket/47343
Ticket 580 - Wrong error code return when using EXTERNAL SASL and no client certificate

Bug Description:  When doing a SASL EXTERNAL bind, and no client certificate is provided,
                  the bind succeeds(as anonymous).  However, the bind should fail with
                  an error 48.

Fix Description:  Check for the missing client certificate and return the appropriate
                  error.

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

Reviewed by: Noriko(Thanks!)
Fix coverity issues

Fixed coverity issues 13169, 13170, 13171

Reviewed by: richm(Thanks!)
Ticket 47317 - should set LDAP_OPT_X_SASL_NOCANON to LDAP_OPT_ON by default - revision

Description:  typo in configuration initialization

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