tests: cope with new vaQuerySurfaceAttributes() API.
tests: cope with new vaQuerySurfaceAttributes() API.

Also factor the code to check whether a specific image format or
surface attribute exists. Cache the list of supported image formats
and surface attributes.

Signed-off-by: Gwenole Beauchesne <729713629d9640cc095f1c77c692e1881f8093c4@intel.com>

android-ia/hardware_intel_libva,CyanogenMod/android_hardware_intel_libva,android-ia/hardware_intel_libva,halleyzhao/libva-fdo,CyanogenMod/android_hardware_intel_libva,android-ia/hardware_intel_libva,halleyzhao/libva-fdo,CyanogenMod/android_hardware_intel_libva,halleyzhao/libva-fdo