Fix deadlock when deleting ghost of closed index. Support closing non-durable indexes.