Ticket 47729 - Directory Server crashes if shutdown during a replication initialization
Bug Description: When a shutdown was detected we marked that the total update was done
prematurely(prp->stopped). This allowed the replication plugin to close
while the total update was still in progress. Other plugins continued to
be shutdown (e.g. ldbm database), while the total update was using shared
resources - which lead to a crash.
Fix Description: Only mark the total update protocol as stopped, after it is finished using
shared resources.
https://fedorahosted.org/389/ticket/47729
Reviewed by: nhosoi(Thanks!)
(cherry picked from commit e7f7e9127717c1d432b10493b626fed334cc595f)