Ticket 49402 - Adding a database entry with the same database name that was deleted hangs server at shutdown
Bug Description: At shutdown, after a backend was deleted, which also had a import
task run, the server hangs at shutdown. The issue is that the
import task destructor used the ldbm inst struct to see if it was
busy, but the inst was freed and the destructor was checking invalid
memory which caused a false positive on the "busy" check.
Fix Description: Do not check if the instance is busy to tell if it's okay to remove
the task, instead just check the task's state.
Reviewed by: lkrispen(Thanks!)
(cherry picked from commit bc6dbf15c160ac7e6c553133b2b936a981cfb7b6)