Unify the pthread, win32 and c11 thread support

Previously, only pthread and Windows thread implementations were
supported.  This commit:

* adds C11 Thread Support library implementation to be used on platforms
  where pthread is not available (the pthread API is superset of C11
  Thread Support library)
* Merges the pthread, C11 and Windows Thread Support into the main
  directory for easier msys2 support
* Fixes the Win32 isc_once implementation to use InitOnceExecuteOnce
  function instead of the custom code
77 jobs for !2701 with ondrej/c11-threads in 28 minutes and 47 seconds (queued for 5 seconds)
latest detached
Status Job ID Name Coverage
  Autoconf
passed #891462
amd64 linux
autoreconf

00:00:53

 
  Precheck
passed #891464
amd64 linux
clang-format

00:00:43

passed #891465
amd64 linux
coccinelle

00:04:38

failed #891463
amd64 linux
misc

00:00:43

 
  Build
passed #891481
amd64 linux
clang:asan

00:03:54

passed #891485
amd64 linux
clang:buster:amd64

00:02:22

passed #891487
amd64 libvirt
clang:freebsd11.3:amd64

00:01:52

passed #891488
amd64 libvirt
clang:freebsd12.1:amd64

00:01:36

passed #891489
amd64 libvirt
clang:openbsd6.6:amd64

00:03:04

passed #891483
amd64 linux
clang:tsan

00:02:39

passed #891466
amd64 linux
gcc:alpine3.11:amd64

00:02:18

passed #891480
amd64 linux
gcc:asan

00:03:31

passed #891479
amd64 linux
gcc:bionic:amd64

00:02:12

passed #891471
amd64 linux
gcc:buster:amd64

00:02:21

passed #891467
amd64 linux
gcc:centos6:amd64

00:02:06

passed #891468
amd64 linux
gcc:centos7:amd64

00:01:59

passed #891469
amd64 linux
gcc:centos8:amd64

00:02:39

passed #891477
amd64 linux
gcc:fedora31:amd64

00:02:09

passed #891484
amd64 linux
gcc:mutexatomics

00:02:14

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

00:02:29

passed #891486
amd64 linux
gcc:pkcs11

00:02:16

passed #891472
amd64 linux
gcc:sid:amd64

00:02:23

passed #891474
arm64 linux
gcc:sid:arm64

00:02:28

passed #891475
i386 linux
gcc:sid:i386

00:02:16

passed #891470
amd64 linux
gcc:stretch:amd64

00:02:17

passed #891482
amd64 linux
gcc:tsan

00:02:34

passed #891476
amd64 linux
gcc:tumbleweed:amd64

00:02:07

passed #891478
amd64 linux
gcc:xenial:amd64

00:02:14

 
  Unit
passed #891504
amd64 linux
unit:clang:asan

00:02:54

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

00:01:59

passed #891510
amd64 libvirt
unit:clang:freebsd11.3:amd64

00:01:44

passed #891511
amd64 libvirt
unit:clang:freebsd12.1:amd64

00:01:32

failed #891506
amd64 linux allowed to fail
unit:clang:tsan

00:02:22

passed #891490
amd64 linux
unit:gcc:alpine3.11:amd64

00:01:58

passed #891503
amd64 linux
unit:gcc:asan

00:02:37

passed #891502
amd64 linux
unit:gcc:bionic:amd64

00:01:42

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

00:02:10

passed #891491
amd64 linux
unit:gcc:centos6:amd64

00:01:49

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

00:01:46

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

00:02:37

passed #891500
amd64 linux
unit:gcc:fedora31:amd64

00:01:56

passed #891507
amd64 linux
unit:gcc:mutexatomics

00:01:50

passed #891509
amd64 linux
unit:gcc:pkcs11

00:01:53

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

00:01:44

passed #891497
arm64 linux
unit:gcc:sid:arm64

00:01:11

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

00:01:57

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

00:02:01

failed #891505
amd64 linux allowed to fail
unit:gcc:tsan

00:06:36

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

00:01:36

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

00:01:55

 
  System
passed #891526
amd64 linux
system:clang:asan

00:16:21

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

00:16:04

passed #891532
amd64 libvirt
system:clang:freebsd11.3:amd64

00:13:18

passed #891533
amd64 libvirt
system:clang:freebsd12.1:amd64

00:13:30

failed #891528
amd64 linux allowed to fail
system:clang:tsan

00:12:13

passed #891512
amd64 linux
system:gcc:alpine3.11:amd64

00:15:22

passed #891525
amd64 linux
system:gcc:asan

00:16:58

passed #891524
amd64 linux
system:gcc:bionic:amd64

00:14:43

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

00:17:07

passed #891513
amd64 linux
system:gcc:centos6:amd64

00:15:02

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

00:15:04

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

00:15:56

passed #891522
amd64 linux
system:gcc:fedora31:amd64

00:14:32

passed #891529
amd64 linux
system:gcc:mutexatomics

00:14:51

passed #891531
amd64 linux
system:gcc:pkcs11

00:15:03

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

00:16:07

passed #891519
arm64 linux
system:gcc:sid:arm64

00:11:46

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

00:17:33

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

00:15:33

failed #891527
amd64 linux allowed to fail
system:gcc:tsan

00:23:31

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

00:14:26

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

00:17:40

 
  Docs
passed #891534
amd64 linux
docs

00:20:18

 
  Postcheck
passed #891538
amd64 linux
cppcheck

00:01:49

passed #891535
amd64 linux
flake8

00:01:47

passed #891536
amd64 linux
pylint

00:01:48

passed #891537
amd64 linux
scan-build

00:07:58

 
Name Stage Failure
failed
system:gcc:tsan System

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
bin/tests/system/*/tsan.*: found 36 matching files

bin/tests/system/*/*/tsan.*: found 265 matching files

tsan/: found 232 matching files

Uploading artifacts to coordinator... ok
id=891527 responseStatus=201 Created token=sfugV_Lg
ERROR: Job failed: exit code 1
failed
system:clang:tsan System

$ find bin -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
bin/tests/system/*/tsan.*: found 727 matching files

bin/tests/system/*/*/tsan.*: found 1062 matching files

tsan/: found 1 matching files

Uploading artifacts to coordinator... ok
id=891528 responseStatus=201 Created token=xZ-rseJi
ERROR: Job failed: exit code 1
failed
unit:gcc:tsan Unit
Running after_script
Running after script...
$ find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
lib/*/tests/tsan.*: found 1 matching files

tsan/: found 4 matching files

Uploading artifacts to coordinator... ok
id=891505 responseStatus=201 Created token=UvUeL5v9
ERROR: Job failed: exit code 1
failed
unit:clang:tsan Unit
Running after_script
Running after script...
$ find lib -name 'tsan.*' -exec python3 util/parse_tsan.py {} \;
Uploading artifacts for failed job
Uploading artifacts...
lib/*/tests/tsan.*: found 63 matching files

tsan/: found 1 matching files

Uploading artifacts to coordinator... ok
id=891506 responseStatus=201 Created token=V5sKy7zY
ERROR: Job failed: exit code 1
failed
misc Precheck
Authenticating with credentials from job payload (GitLab Registry)
$ sh util/checklibs.sh > checklibs.out
Running after_script
Uploading artifacts for failed job
Uploading artifacts...
WARNING: util/newcopyrights: no matching files
checklibs.out: found 1 matching files

Uploading artifacts to coordinator... ok
id=891463 responseStatus=201 Created token=ypJixEMc
ERROR: Job failed: exit code 1