Add method to check if VPDAU is supported

(cherry picked from commit b747742e8a75073fe0f08aca30261590b8e1d3fb)
Fix VDPAU being always used when present even if not working (test was always true)

If VDPAU was installed, but not working (like on an intel machine with also VAAPI support), VDPAU would be used regardless
Simplify VDPAU support detection, no point checking for features if basic detection has failed.

(cherry picked from commit eefc369fcd187fa5cb1c7cc84f850205b39bd28e)
Fix memory leak

(cherry picked from commit fadcad406cc14092c3089ea5539dc41ec1221b49)