move database attach/detach functions to db.c, instead of requiring them to be implemented for every database type. instead, they must implement a 'destroy' function that is called when references go to zero. this enables us to use ISC_REFCOUNT_IMPL for databases, with detailed tracing enabled by setting DNS_DB_TRACE to 1.