include: provide appropriate eglplatform.h depending on EGL type

When using X11, we install the standard khronos eglplatform.h.
When using fb, we install the khronos eglplatform.h with the __unix__
section filled with struct mali_native_window.

Also fix up the test to automatically build X11 or fbdev support.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
version: fix for shifted GET_VERSION_API in r3p1

We abuse the fact that GET_API_VERSION is the last _MALI_UK_CORE_SUBSYSTEM
ioctl, and that it goes from nr 5 to 3 in r3p1. So in r3p1, calling ioctl 5
results in -EPERM, which we can nicely catch and then we can call ioctl 3
to get the proper version.

Also add support for detecting r3p2.

Signed-off-by: Luc Verhaegen <libv@skynet.be>