Add isc_taskmgr_detach when task is created while shutting down

When taskmgr is shutting down, the creating the task would attach
to the taskmgr, but don't detach on error condition.
72 jobs for !5006 with ondrej/fix-missing-isc_taskmgr_detach-on-exiting in 20 minutes and 52 seconds (queued for 17 seconds)
latest detached
Status Job ID Name Coverage
  Autoconf
passed #1704866
amd64 linux
autoreconf

00:00:20

 
  Precheck
passed #1704868
amd64 linux
clang-format

00:00:17

passed #1704869
amd64 linux
coccinelle

00:03:52

passed #1704937
amd64 linux
danger

00:00:14

passed #1704867
amd64 linux
misc

00:00:21

passed #1704871
amd64 linux
tarball-create

00:01:45

failed #1704870
amd64 linux
danger

00:00:15

 
  Build
passed #1704882
amd64 linux
clang:asan

00:02:02

passed #1704886
amd64 linux
clang:buster:amd64

00:01:00

passed #1704889
amd64 libvirt
clang:freebsd11:amd64

00:01:10

passed #1704890
amd64 libvirt
clang:freebsd12:amd64

00:01:12

passed #1704891
amd64 libvirt
clang:openbsd:amd64

00:02:46

passed #1704884
amd64 linux
clang:tsan

00:01:19

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

00:00:55

passed #1704881
amd64 linux
gcc:asan

00:01:42

passed #1704876
amd64 linux
gcc:buster:amd64

00:00:42

passed #1704873
amd64 linux
gcc:centos7:amd64

00:00:49

passed #1704874
amd64 linux
gcc:centos8:amd64

00:00:50

passed #1704880
amd64 linux
gcc:focal:amd64

00:01:04

passed #1704885
amd64 linux
gcc:mutexatomics

00:01:04

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

00:00:51

passed #1704877
amd64 linux
gcc:sid:amd64

00:01:15

passed #1704887
amd64 linux
gcc:softhsm2.4

00:00:50

passed #1704888
amd64 linux
gcc:softhsm2.6

00:00:57

passed #1704875
amd64 linux
gcc:stretch:amd64

00:00:53

passed #1704883
amd64 linux
gcc:tsan

00:01:12

passed #1704879
amd64 linux
gcc:tumbleweed:amd64

00:00:48

passed #1704892
amd64 windows
msvc:windows:amd64

00:00:49

 
  Unit
passed #1704902
amd64 linux
unit:clang:asan

00:02:34

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

00:01:21

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

00:02:02

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

00:01:52

passed #1704911
amd64 libvirt
unit:clang:openbsd:amd64

00:03:16

passed #1704904
amd64 linux
unit:clang:tsan

00:03:30

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

00:01:34

passed #1704901
amd64 linux
unit:gcc:asan

00:02:34

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

00:02:24

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

00:01:34

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

00:01:26

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

00:01:25

passed #1704905
amd64 linux
unit:gcc:mutexatomics

00:01:33

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

00:01:17

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

00:01:22

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

00:01:18

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

00:00:13

passed #1704903
amd64 linux
unit:gcc:tsan

00:04:19

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

00:01:23

 
  System
passed #1704921
amd64 linux
system:clang:asan

00:14:34

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

00:12:11

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

00:11:51

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

00:11:34

passed #1704923
amd64 linux
system:clang:tsan

00:16:33

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

00:13:31

passed #1704920
amd64 linux
system:gcc:asan

00:14:50

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

00:14:03

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

00:13:45

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

00:12:16

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

00:12:14

passed #1704924
amd64 linux
system:gcc:mutexatomics

00:13:47

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

00:12:58

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

00:12:44

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

00:12:26

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

00:12:06

passed #1704922
amd64 linux
system:gcc:tsan

00:17:40

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

00:12:44

failed #1704929
amd64 libvirt
system:clang:freebsd12:amd64

00:00:00

 
  Docs
passed #1704930
amd64 linux
docs

00:00:48

 
  Postcheck
passed #1704934
amd64 linux
cppcheck

00:00:45

passed #1704931
amd64 linux
flake8

00:00:21

passed #1704935
amd64 linux
gcov

00:00:33

78.0%
passed #1704932
amd64 linux
pylint

00:00:22

passed #1704933
amd64 linux
scan-build

00:04:11