a64a2e9 Ticket 48922 - Fix crash when deleting backend while import is running

Authored and Committed by mreynolds 7 years ago
    Ticket 48922 - Fix crash when deleting backend while import is running
    
    Bug Description:  If you delete a backend from the config while an
                      import is running the server can crash.
    
    Fix Description:  When deleting a backend from the config wait for the
                      backend instance to not be busy before removing the
                      indexes.  Otherwise the dbenv is not stable and this
                      can cause the crash.
    
    https://fedorahosted.org/389/ticket/48922
    
    Reviewed by: nhosoi(Thanks!)
    
    (cherry picked from commit 6c77c37ae5ce847ffa2bd75287dbd157c2f2d6af)