Bug 1129660 - Adding users to user group throws Internal server error.

Description: 389-ds-base-1.2.11 branch did not have the commit
a71633d56951dd6c4d0368c790b85628f1598968 (Ticket #47313 - Indexed
search with filter containing '&' and "!" with attribute subtypes
gives wrong result).

This patch backporting just the NULL idl checking in idl_common.c
from the commit to the 389-ds-base-1.2.11 branch.

https://bugzilla.redhat.com/show_bug.cgi?id=1129660

Reviewed by nkinder@redhat.com (Thank you, Nathan!!)
bump version to 1.2.11.31
Ticket 47457 - default nsslapd-sasl-max-buffer-size should be 2MB

Description:  Increase the default max buffer size to 2mb from 64k.

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

Reviewed by: richm(Thanks!)

(cherry picked from commit 846447c62e3ad2150b054c87c96e797dc1d803f3)
(cherry picked from commit c65fcdcef8d277273d85a00835d063eeaa22123b)
Ticket #47875 - dirsrv not running with old openldap

Description: To check libldif, -lldap$ol_libver needs to be added
to LDFLAGS to compile test conftest.c.

(cherry picked from commit 8c7ac72659758ef1ea96794552e584fdbe803778)
(cherry picked from commit 84f91ddac5020295cbc0a3f84f14ab24f539ed00)
(cherry picked from commit a690f70780e658c331ffdb3a2e7ff335a801c257)
Ticket #47875 - dirsrv not running with old openldap

Description: removed unnecessary checking for -lldif from openldap.m4.
Ticket 47885 - deref plugin should not return references with noc access rights

Bug Description:  deref shows derefernced entries for which th client doesn't
                  have access as dn and empty attribute list

Fix Description:   if client has no accesss to the derferernced entry then
                   omit it from the list in the deref control
                   In general, if no entries are returned don't send an empty control

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

Reviewed by: noriko, thanks
Ticket #47748 - Simultaneous adding a user and binding as the user could fail in the password policy check

Description: commit 4fc53e1a63222d0ff67c30a59f2cff4b535f90a8 fix for
Ticket #47748 introduced a bug: "Simple bind hangs after enabling
password policy".

In do_bind, slapi_check_account_lock and need_new_pw overwrote the
return code from backend bind which is used later. This patch fixes
it not to override the return code.

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

Reviewed by mreynolds@redhat.com (Thank you, Mark!!)

(cherry picked from commit 4f11606b02419c8ccdb319b8040e683af9109d1b)
(cherry picked from commit 8c82941c0f2b0b5d7fa698a1ca3e4f26245cf85a)
(cherry picked from commit 5b6d60ec4d3d93d1d69f6a071ce135a06f4c8cfd)
fix for 47885 did not always return a response control

reviewd by rich, thanks