backport FFmpeg 4.4 support in 3.0
XP support is added back to FFmpeg 4.4 by using our pthreadGC2 instead of their internal w32thread.
Intermetmediate patches are backported to bring the history of changes closer to 4.0 master.
Edited by Steve Lhomme