Ticket 47368 - Fix coverity issues

CID 12376 (#1 of 1): Explicit null dereferenced (FORWARD_NULL)
CID 12377 (#1 of 1): Uninitialized pointer read (UNINIT)

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

Reviewed by: rmeggins(Thanks!)
Ticket 47577 - crash when removing entries from cache

Bug Description:  when the dn of an entry in the cache was adjusted to the parent dn, for soenm time
	teh dn was not defined, anothe thread accessing the dn of teh chached entry could crash

Fix Description:   hold the cache mutex when modifyingthe dn of an entry in the cache

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

Reviewed by: rmeggins
Ticket #47581 - Winsync plugin segfault during incremental backoff

Bug description: Once WinSync backoff timer is set, even if the
protocol that the backoff timer belongs to is deleted by removing
the windows sync agreement, the timer is not deleted from the event
queue.  Thus the timer is expired and backoff is called, it crashes
the server since the protocol handle is already freed, then.

Fix description: Make sure to delete the backoff timer when
1) a windows sync agreement is removed and the protocol is deleted, and
2) a new backoff timer set and there is already a backoff timer set up.

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

Reviewed by rmeggins (Thank you, Rich!!)
Ticket #47581 - Winsync plugin segfault during incremental backoff (phase 2)

Fix description: Apply the previous patch Ticket #47581 against the
replication plug-in (repl5_inc_protocol.c):
Make sure to delete the backoff timer when
1) a replication agreement is removed and the protocol is deleted, and
2) a new backoff timer set and there is already a backoff timer set up.

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

Reviewed by rmeggins (Thank you, Rich!!)
Ticket 47582 - agmt_count in Replica could become (PRUint64)-1

Bug Description:  agmt_count can go negative, and lead to a crash.  This can
                  happen when creating an agreement fails, and we lower the count
                  before it was actually incremented.

Fix Description:  Move the agmt incrementing to agmt_new_from_entry(), as
                  this same function can also cause the count to be decremented
                  if something fails.

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

Reviewed by: richm(Thanks!)
Ticket 47588 - Compiler warnings building on F19

This addresses a few compiler warnings that show up when building
on F19.  The issues are minor (unused typedef and an incorrect
usage of memset in some debugging ifdef'd code).