Coverity Fixes (Part 4)

11753 - Resource leak (aclparse.c)
11754 - Resource leak (dna.c)
11755 - Resource leak (dna.c)
11756 - Resource leak (linked_attrs.c)
11757 - Resource leak (pam_ptconfig.c)
11758 - Resource leak (repl5_replica_config.c)
11759 - Resource leak (windows_inc_protocol.c)
11760 - Resource leak (syntaxes/value.c)
11761 - Resource leak (dblayer.c)
11764 - Resource leak (dblayer.c)
11766 - Resource leak (dblayer.c)
11769 - Resource leak (entry.c)
11770 - Resource leak (entry.c)
11773 - Resource leak (schema.c)
11774 - Resource leak (snmp_collator.c)
11775 - Resource leak (ldclt/data.c)
11776 - Resource leak (tools/mmldif.c)
11777 - Resource leak (snmp/main.c)
11778 - Resource leak (lib/libutil/dbconf.c)
11779 - Resource leak (lib/libaccess/register.cpp)
11781 - Resource leak (lib/libadmin/error.c)
11872 - Resource leak (agtmmap.c)

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

Reviewed by: nhosoi(Thanks!)
Coverity Fixes (Part 5)

11784 - Deference before null check (uiduniq/uid.c)
11785 - Deference before null check (conntable.c)
11786 - Deference before null check (opshared.c)
11787 - Deference before null check (tools/dbscan.c)
11788 - Deference before null check (tools/dbscan.c)
11789 - Deference before null check (tools/dbscan.c)
11790 - Allocation size mismatch (idl.c)
11791 - Allocation size mismatch (idl.c)
11792 - Wrong sizeof argument (dna.c)
11793 - Stray semicolon (lib/base/util.c)
11794 - Stray semicolon (lib/base/util.c)
11795 - Destination buffer too small (log.c)
11809 - Use after free (repl5_mtnode_ext.c)
11849 - Unitialized sclara variable (dblayer.c)

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

Reviewed by: richm(Thanks!!)
(cherry picked from commit 6d23891a44fd41aa0580cdc223667f0ca2b9e1cc)
Ticket #47378 - fix recent compiler warnings

https://fedorahosted.org/389/ticket/47378
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: Fix the various compiler warnings as reported by
http://jenkins.cloud.fedoraproject.org/job/389-ds-base/ws/build-warns.1370449480.txt
In addition, fixed a bug in the slapi_re_subs_ext - if there was an
ampersand that did not need to be replaced, that is, if the ampersand
was part of an LDAP search filter, it was replaced with a '('.  Also, an
ampersand preceeded by an open parenthesis and followed by a non-open
parenthesis is supposed to be replaced in the string, but this was not
working.
Platforms tested: RHEL6 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit 0dc230b007dc3ad292961f378421b03736b68f9e)
Ticket 47385 - DS not shutting down when disk monitoring threshold is reached

Bug Description:  If verbose logging is enabled, it fails to correctly
                  identify that the logging was disabled, and it gets
                  stuck in an endless loop - never shutting the server down.

                  Also, whe the server does shutdown due to a disk full, the
                  pid file is not removed.

Fix Description:  Check for the two possible error log levels that indicate
                  verbose logging is disabled.  There were also logic errors
                  when determining if it was ok to disable access/audit logging,
                  and if to delete rotated logs.

                  Also removed the "nsslapd-disk-monitoring-preserve-logging"
                  setting, as it really didn't served a purpose because it was
                  basically the same as "nsslapd-disk-monitoring-logging-critical".

                  Lastly, if the server is being shutdown from a "disk full"
                  condition, then we need to manually remove the pidfile.

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

Reviewed by: Noriko(Thanks!)