Ticket 47372 - make old-idl tunable

Bug Description:  With the change from ticket 47326 old-idl is working, but tests
                  showed that performance heavily depends on the size of the idlists.
                  So idl_maxids should be made configurable.

Fix Description:  Added a new config ldbm config setting, "nsslapd-old-idl-maxids".
                  If this is not set, which is the default value, then we calulate it
                  the old way, otherwise the config setting is used.

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

Reviewed by: ?
Coverity Fixes (part 1)

11648 - string length miscalulation (ldclt.c)
11655 - unchecked return value (agtmmap.c)
11656 - unchecked return value (dblayer.c)
11657 - unchecked return value (daemon.c)
11658 - unchecked return value (daemon.c)
11660 - unchecked return value (log.c)
11661 - unchecked return value (main.c)
11662 - unchecked return value (ssl.c)
11668 - Same on both sides (repl5_protocol_util.c)
11669 - Same on both sides (ssl.c)
11670 - Same on both sides (util.c)
11673 - Copy-and-paste error (tools/rsearch/sdattable.c)

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

Reviewed by: Noriko(Thanks!)
Ticket 47358 - implement backend optimazation levels

Bug Description:  it is an enhancement to be able to test different
	otimizations and have the default bahaviour as fallback.

Fix Description:   As described in the ticket, this fix introduces
	three optimization switches.
	1] bypass ruv update inside transaction, might be replaced by
	   fix for ticket 564
	2] reverse order of txn begin/commit and backen lock/unlock
	   to benefit from fix #568
	3] find and lock entry to modify before taking backend lock
	   to decrease time backend lock is held

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

Reviewed by: Rich, thanks
Coverity Fixes (Part 2)

11674 - logically dead code (collate.c)
11675 - logically dead code (windows_protocol_util.c)
11676 - logically dead code (index.c)
11677 - logically dead code (ldbm_entryrdn.c)
11678 - logically dead code (ldbm_entryrdn.c)
11680 - logically dead code (ldbm_search.c)
11681 - Dead default in switch (seq.c)
11683 - logically dead code (bind.c)
11684 - logically dead code (connection.c)
11686 - Dead default in switch (log.c)
11687 - Dead default in switch (log.c)
11688 - Dead default in switch (log.c)
11689 - Dead default in switch (log.c)
11690 - Dead default in switch (log.c)
11691 - Dead default in switch (log.c)

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

Reviewed by: nhosoi(Thanks!)