Patched to compile if Wayland is disabled via SDL_config.h (thanks, Martin!).

Fixes Bugzilla #2351.
Move Wayland driver above dummy, check for driver availability before creation
Fixed dynamic loading of NAS in CMake project.
Fixes 2356, [Android] SDL_JoystickGetAttached does not function

Also fix a potential NULL pointer access in android/SDL_SYS_JoystickGetGUID
Fixed XF86 VidMode extension dynamic loading with CMake project.
Fix detection of iOS for disabling dynamic API.