Fix task timing race in setnsec3param()

When setnsec3param() is schedule from zone_postload() there's no
guarantee that `zone->db` is not `NULL` yet.  Thus when the
setnsec3param() is called, we need to check for `zone->db` existence and
reschedule the task, because calling `rss_post()` on a zone with empty
`.db` ends up with no-op (the function just returns).

(cherry picked from commit 0127ba64)
80 jobs for !4915 with 2636-timing-race-in-setnsec3param-task-v9_16 in 30 minutes and 37 seconds (queued for 13 seconds)
latest detached
Status Job ID Name Coverage
  Precheck
passed #1648059
amd64 linux
autoreconf

00:00:15

passed #1648061
amd64 linux
clang-format

00:00:19

passed #1648062
amd64 linux
coccinelle

00:03:48

passed #1648137
amd64 linux
danger

00:00:16

passed #1648060
amd64 linux
misc

00:00:13

failed #1648063
amd64 linux
danger

00:00:18

 
  Build
passed #1648076
amd64 linux
clang:asan

00:03:52

passed #1648080
amd64 linux
clang:buster:amd64

00:01:59

passed #1648083
amd64 libvirt
clang:freebsd11:amd64

00:01:52

passed #1648084
amd64 libvirt
clang:freebsd12:amd64

00:01:45

passed #1648085
amd64 libvirt
clang:openbsd:amd64

00:04:00

passed #1648078
amd64 linux
clang:tsan

00:02:21

passed #1648064
amd64 linux
gcc:alpine3.13:amd64

00:01:52

passed #1648075
amd64 linux
gcc:asan

00:03:37

passed #1648068
amd64 linux
gcc:buster:amd64

00:01:32

passed #1648065
amd64 linux
gcc:centos7:amd64

00:01:35

passed #1648066
amd64 linux
gcc:centos8:amd64

00:01:32

passed #1648074
amd64 linux
gcc:focal:amd64

00:01:36

passed #1648079
amd64 linux
gcc:mutexatomics

00:01:43

passed #1648070
amd64 linux
gcc:out-of-tree

00:01:32

passed #1648069
amd64 linux
gcc:sid:amd64

00:02:08

passed #1648071
i386 linux
gcc:sid:i386

00:01:40

passed #1648081
amd64 linux
gcc:softhsm2.4

00:01:40

passed #1648082
amd64 linux
gcc:softhsm2.6

00:01:43

passed #1648067
amd64 linux
gcc:stretch:amd64

00:01:52

passed #1648077
amd64 linux
gcc:tsan

00:01:52

passed #1648072
amd64 linux
gcc:tumbleweed:amd64

00:01:39

passed #1648073
amd64 linux
gcc:xenial:amd64

00:01:46

passed #1648087
amd64 windows
msvc:windows:amd64

00:00:57

passed #1648086
amd64 linux
nolibtool:sid:amd64

00:02:07

 
  Unit
passed #1648099
amd64 linux
unit:clang:asan

00:01:11

passed #1648103
amd64 linux
unit:clang:buster:amd64

00:00:35

passed #1648106
amd64 libvirt
unit:clang:freebsd11:amd64

00:01:12

passed #1648107
amd64 libvirt
unit:clang:freebsd12:amd64

00:01:01

passed #1648101
amd64 linux
unit:clang:tsan

00:01:30

passed #1648088
amd64 linux
unit:gcc:alpine3.13:amd64

00:00:48

passed #1648098
amd64 linux
unit:gcc:asan

00:01:11

passed #1648092
amd64 linux
unit:gcc:buster:amd64

00:00:56

passed #1648089
amd64 linux
unit:gcc:centos7:amd64

00:00:40

passed #1648090
amd64 linux
unit:gcc:centos8:amd64

00:00:39

passed #1648097
amd64 linux
unit:gcc:focal:amd64

00:00:36

passed #1648102
amd64 linux
unit:gcc:mutexatomics

00:00:36

passed #1648093
amd64 linux
unit:gcc:sid:amd64

00:00:37

passed #1648094
i386 linux
unit:gcc:sid:i386

00:00:42

passed #1648104
amd64 linux
unit:gcc:softhsm2.4

00:00:35

passed #1648105
amd64 linux
unit:gcc:softhsm2.6

00:00:37

passed #1648091
amd64 linux
unit:gcc:stretch:amd64

00:00:36

passed #1648100
amd64 linux
unit:gcc:tsan

00:01:48

passed #1648095
amd64 linux
unit:gcc:tumbleweed:amd64

00:00:34

passed #1648096
amd64 linux
unit:gcc:xenial:amd64

00:00:37

passed #1648108
amd64 linux
unit:nolibtool:sid:amd64

00:00:52

 
  System
passed #1648120
amd64 linux
system:clang:asan

00:12:59

passed #1648124
amd64 linux
system:clang:buster:amd64

00:11:36

passed #1649021
libvirt amd64
system:clang:freebsd11:amd64

00:10:56

passed #1648128
amd64 libvirt
system:clang:freebsd12:amd64

00:10:46

passed #1648122
amd64 linux
system:clang:tsan

00:15:06

passed #1648109
amd64 linux
system:gcc:alpine3.13:amd64

00:12:06

passed #1648119
amd64 linux
system:gcc:asan

00:13:40

passed #1648113
amd64 linux
system:gcc:buster:amd64

00:12:48

passed #1648110
amd64 linux
system:gcc:centos7:amd64

00:11:48

passed #1648111
amd64 linux
system:gcc:centos8:amd64

00:11:56

passed #1648118
amd64 linux
system:gcc:focal:amd64

00:12:10

passed #1648123
amd64 linux
system:gcc:mutexatomics

00:10:59

passed #1648114
amd64 linux
system:gcc:sid:amd64

00:11:41

passed #1648115
i386 linux
system:gcc:sid:i386

00:09:26

passed #1648125
amd64 linux
system:gcc:softhsm2.4

00:11:59

passed #1648126
amd64 linux
system:gcc:softhsm2.6

00:11:49

passed #1648112
amd64 linux
system:gcc:stretch:amd64

00:10:42

passed #1648121
amd64 linux
system:gcc:tsan

00:15:28

passed #1648116
amd64 linux
system:gcc:tumbleweed:amd64

00:11:10

passed #1648117
amd64 linux
system:gcc:xenial:amd64

00:10:20

passed #1648129
amd64 linux
system:nolibtool:sid:amd64

00:11:46

failed #1649014
libvirt amd64
system:clang:freebsd11:amd64

00:10:58

failed #1648127
amd64 libvirt
system:clang:freebsd11:amd64

00:11:08

 
  Docs
passed #1648130
amd64 linux
docs

00:02:09

 
  Postcheck
passed #1648134
amd64 linux
cppcheck

00:00:22

passed #1648131
amd64 linux
flake8

00:00:19

passed #1648135
amd64 linux
gcov

00:00:35

75.0%
passed #1648132
amd64 linux
pylint

00:00:23

passed #1648133
amd64 linux
scan-build

00:09:06