gallium/dri2: Refactor image property queries