configure: add test for POSIX threads

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
vdpau_wrapper: make the fixes initialization thread-safe

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
vdpau_wrapper: make initialization of library handles thread-safe

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
vdpau_wrapper: protect concurrent access to _imp_get_proc_address

The wrapper, as it's currently written, cannot cope with more than one
VdpGetProcAddress implementation. Luckily, this should hardly ever
happen.

This patch protects access to the _imp_get_proc_address variable to
conform to the memory model, and ensures that a single VDPAU
implementation is used - failing safe if not so.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>