Delete the DB before freeing block cache and filter policy.