Compilation warnings (ticket 47350)

Bug Description:
	Get rid of the following warnings:
repl5_replica_config.c:543:14: warning: variable 'r' set but not used [-Wunused-but-set-variable]
repl5_replica_config.c:721: warning: implicit declaration of function 'valuearray_free'
repl5_replica_config.c: In function 'replica_config_search':
repl5_replica_config.c:799: warning: passing argument 2 of 'search_requested_attr' discards qualifiers from pointer target type
repl5_replica_config.c:753: note: expected 'char *' but argument is of type 'const char *'
repl5_replica_config.c:804: warning: passing argument 2 of 'search_requested_attr' discards qualifiers from pointer target type
repl5_replica_config.c:753: note: expected 'char *' but argument is of type 'const char *'

Fix Description:

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

Reviewed by: Mark Reynolds

Platforms tested: fedora

Flag Day: no

Doc impact: no
Coverity Fixes (Part 3)

11692 - Explicit null dereferenced (libavl/avl.c)
11695 - Explicit null dereferenced (cb_conn_stateless.c)
11696 - Explicit null dereferenced (memberof_config.c)
11697 - Explicit null dereferenced (memberof.c)
11698 - Explicit null dereferenced (memberof.c)
11699 - Explicit null dereferenced (memberof.c)
11700 - Explicit null dereferenced (memberof.c)
11701 - Explicit null dereferenced (cl5_api.c)
11702 - Explicit null dereferenced (cl5_api.c)
11703 - Dereference after null check (cl5_clcache.c)
11704 - Dereference after null check (repl5_replica_config.c)
11705 - Explicit null dereferenced (syntaxes/string.c)
11706 - Dereference after null check (plugin.c)
11707 - Dereference after null check (plugin.c)
11711 - Dereference after null check (ldif2ldbm.c)
11713 - Dereference after null check (dn.c)
11726 - Dereference after null check (valueset.c)
11729 - Explicit null dereferenced (libaccess/oneeval.cpp)
11744 - Explicit null dereferenced (dbverify.c)
11745 - Out-of-bounds read (linked_attrs.c)
11745 - Out-of-bounds read (memberof.c)

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

Reviewed by: richm(Thanks!)