Fix deadlock in RPZ update code.

In dns_rpz_update_from_db we call setup_update which creates the db
iterator and calls dns_dbiterator_first. This unpauses the iterator and
might cause db->tree_lock to be acquired. We then do isc_task_send(...)
on an event to do quantum_update, which (correctly) after each iteration
calls dns_dbiterator_pause, and re-isc_task_sends itself.

That's an obvious bug, as we're holding a lock over an async task send -
if a task requesting write (e.g. prune_tree) is scheduled on the same
workers queue as update_quantum but before it, it will wait for the
write lock indefinitely, resulting in a deadlock.

To fix it we have to pause dbiterator in setup_update.
39 jobs for !1770 with 973-pause-dbiterator-in-rpz in 40 seconds (queued for 3 seconds)
detached
Status Job ID Name Coverage
  Precheck
passed #208838
amd64 linux
🐞:sid:amd64

00:00:13

passed #208837
amd64 linux
misc:sid:amd64

00:00:17

 
  Build
canceled #208849
amd64 linux
asan:sid:amd64

00:00:21

canceled #208850
amd64 linux
clang:stretch:amd64

00:00:20

canceled #208851
i386 linux
clang:stretch:i386

00:00:20

canceled #208839
amd64 linux
docs:sid:amd64

00:00:19

canceled #208848
amd64 linux
gcc:bionic:amd64

00:00:21

canceled #208840
amd64 linux
gcc:centos6:amd64

00:00:20

canceled #208841
amd64 linux
gcc:centos7:amd64

00:00:20

canceled #208846
amd64 linux
gcc:fedora29:amd64

00:00:22

canceled #208842
amd64 linux
gcc:jessie:amd64

00:00:20

canceled #208844
amd64 linux
gcc:sid:amd64

00:00:21

canceled #208845
i386 linux
gcc:sid:i386

00:00:22

canceled #208843
amd64 linux
gcc:stretch:amd64

00:00:21

canceled #208847
amd64 linux
gcc:xenial:amd64

00:00:21

canceled #208852
amd64 linux
pkcs11:sid:amd64

00:00:20

 
  Test
canceled #208871
amd64 linux
system:asan:sid:amd64

canceled #208869
amd64 linux
system:gcc:bionic:amd64

canceled #208853
amd64 linux
system:gcc:centos6:amd64

canceled #208855
amd64 linux
system:gcc:centos7:amd64

canceled #208865
amd64 linux
system:gcc:fedora29:amd64

canceled #208857
amd64 linux
system:gcc:jessie:amd64

canceled #208861
amd64 linux
system:gcc:sid:amd64

canceled #208863
i386 linux
system:gcc:sid:i386

canceled #208859
amd64 linux
system:gcc:stretch:amd64

canceled #208867
amd64 linux
system:gcc:xenial:amd64

canceled #208874
amd64 linux
system:pkcs11:sid:amd64

canceled #208872
amd64 linux
unit:asan:sid:amd64

canceled #208873
amd64 linux
unit:clang:stretch:amd64

canceled #208870
amd64 linux
unit:gcc:bionic:amd64

canceled #208854
amd64 linux
unit:gcc:centos6:amd64

canceled #208856
amd64 linux
unit:gcc:centos7:amd64

canceled #208866
amd64 linux
unit:gcc:fedora29:amd64

canceled #208858
amd64 linux
unit:gcc:jessie:amd64

canceled #208862
amd64 linux
unit:gcc:sid:amd64

canceled #208864
i386 linux
unit:gcc:sid:i386

canceled #208860
amd64 linux
unit:gcc:stretch:amd64

canceled #208868
amd64 linux
unit:gcc:xenial:amd64

canceled #208875
amd64 linux
unit:pkcs11:sid:amd64