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
(cherry picked from commit 7272dbda7f43974eed003cbcfc0ddd57fe433687)
(cherry picked from commit 1056a6282f246a9c396b8052d726005fe8189512)
(cherry picked from commit 00b19f3b4af662341c72fa6cfd60b5e136f1428f)
(cherry picked from commit ecc210f3ca25528f5f718680409ded0021d5604c)
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.

In addition to commit d70e66b2157ce3ba40c5e1cb074c2d5c150ddc5b,
the 389-ds-base-1.2.11 patch includes this change that is already made
on 389-ds-base-1.3.1 and newer.
  windows_inc_run
+   if(dirsync){
+       int rc = slapi_eq_cancel(dirsync);
+   }

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

(cherry picked from commit d70e66b2157ce3ba40c5e1cb074c2d5c150ddc5b)
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!!)
(cherry picked from commit 8eecc43e0160e132949ed504162b4536d6040620)
(cherry picked from commit 962fc45a15a4bc2e0d13d3d8b12225105ef43dbb)
(cherry picked from commit 0df4c665401db297f303ad91f5e892b1e604e63a)