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>

chenxianqin/vaapi-libva,gbeauchesne/libva,zzhhui/libva,chenxianqin/vaapi-libva,gbeauchesne/libva,pma1/libva,pma1/libva,01org/iotg-lin-gfx-libva,gbeauchesne/libva,01org/libva-cros,01org/libva-cros,01org/iotg-lin-gfx-libva,01org/iotg-lin-gfx-libva,chenxianqin/vaapi-libva,zzhhui/libva,pma1/libva,01org/libva-cros,zzhhui/libva