[v9.18] Don't cleanup uninitialized dns_resolver buckets
If the isc_task_create_bound() fails in the middle of buckets initialization - the most common case would be shutdown initialized during reload, not all tasks would be initialized, but the cleanup code would try to cleanup all buckets.
Make sure that we cleanup only the initialized buckets by setting ntasks to the number of already initialized tasks on the error path.
Closes #3723 (closed)