d3dvideosink: clean up and fix a few concurrency issues

1. use GCond to wait until thread is launched - more efficient
than sleep
2. use atomic get/set on variables shared with hidden window thread
3. document why we need to release the class sink in certain cases
4. d3d_class_notify_device_lost_all does not need class sink released
5. d3d_supported_caps must be protected by class sink
22 jobs for d3dvideosink_race in 52 minutes and 48 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Preparation
passed #914938
gst indent

00:00:23

passed #914937
manifest

00:00:42

 
  Build
passed #914948
build cerbero cross-android universal

00:07:54

manual #914952
gst-ios-12.2 allowed to fail manual
build cerbero cross-ios universal
passed #914949
build cerbero cross win32

00:04:25

passed #914950
build cerbero cross win64

00:05:03

passed #914947
build cerbero fedora x86_64

00:09:12

passed #914951
gst-macos-10.14
build cerbero macos x86_64

00:07:25

passed #914943
build clang fedora x86_64

00:08:42

passed #914939
build fedora x86_64

00:10:55

passed #914946
docker windows 1607
build msys2

00:12:39

passed #914940
build nodebug fedora x86_64

00:02:42

passed #914941
build static fedora x86_64

00:12:05

passed #914942
build static nodebug fedora x86_64

00:03:51

passed #914944
docker windows 1607
build vs2017 amd64

00:11:23

passed #914945
docker windows 1607
build vs2017 x86

00:10:43

 
  Test
passed #914953
gstreamer
check fedora

00:03:25

passed #914954
gstreamer
integration testsuites fedora

00:38:40

passed #914955
gstreamer
valgrind bad

00:07:41

 
  Integrate
passed #914956
cross-android universal examples

00:07:01

manual #914958
gst-ios-12.2 allowed to fail manual
cross-ios universal examples
passed #914957
documentation

00:03:27