android: util: use NDK ASurfaceTexture API if available
When the native SurfaceTexture API is available, construct a SurfaceTexture
object from Java through JNI calls and store the producer side
(Surface/ANativeWindow) for the AWindowHandler clients.
The SurfaceTexture constructor is only available since API 26 but the NDK
API for ASurfaceTexture already require API 28
To use new native functions, we wrap ASurfaceTextureAPI structure pointers
inside a new set of native functions, it allow to describe some specifics
behaviors for the NDK API.
If the NDK API requierements are met, native functions for ASurfaceTexture are
used instead of their JNI counterpart. The behavior change is made through the
SurfaceTextureHandler pointer structure.
Then, in all cases, wrap pointers of SurfaceTextureHandler in a common functions
used by OpenGL to attach / update / detach textures.
fixes #20344
Signed-off-by: Thomas Guillem <thomas@gllm.fr>