Move the dns_db_setloop into cache_create_db()
The dns_cache_flush() drops the old database and creates a new one, but it forgets to pass the loop that runs the node pruning and cleaning the rbtdb when flushing it next time. This causes the cleaning to skip cleaning the parent nodes (with .down == NULL) leading to increased memory usage over time until the database is unable to keep up and just stays overmem all the time.
Closes #4621 (closed)