[rbp] Restructure the egl context and display variables

Using a global for context that gets set by the first run of the
texture thread is risky if the first function call happens directly
(if it's in a suitable thread so bypasses the texture thread).
[rbp] Use generic texture queue for alloc/destroy

This avoids a subtle bug where one thread calls tex->Sync.Set()
and another calls tex->sync.Wait(); delete tex;

The Set can cause a task switch before the Set call exits.
If the freed tex structure is overwritted before the first thread
is switched back to, it can crash or hang.
[rbp] Fix leaks in the failure handling of jpeg decode to texture

There are a couple of cases where memory could be leaked after an allocation failure
when decoding jpegs to textures.
FIX: [mediacodec] reset if we are out of input buffers
JSON-RPC: add "xbmc.subtitle.module" enum in the json-rpc Addon.Types service description. Bump API version to 6.14.3
[osxsink] - fix bad access when device announces more then 8 channels - fixes #15065
Merge pull request #4514 from joethefox/jsonrpc_subtitle_addontype

JSON-RPC: add "xbmc.subtitle.module" enum in the json-rpc Addon.Types se...
[eventclient] Fix Wiimote battery problem

[eventclient] Fix Wiimote battery problem

Remove commented code
Merge pull request #4297 from maxwellito/wiimote_battery_fix

Fix Wiimote battery problem
Merge pull request #4535 from Memphiz/fixchannelmap

[osxsink] - fix bad access when device announces more then 8 channels - ...
Merge pull request #4524 from koying/fixamcinbuffer

FIX: [mediacodec] reset if we are out of input buffers
Merge pull request #4503 from popcornmix/texture_leak

[rbp] Fixes for hangs and leaks in jpeg->texture code
videoplayer: adapt lateness detection and dropping to buffering
video player: present correct pts to user for a/v sync (after buffering in renderer)
videoplayer: some rework and documentation
renderer: bump buffers to 5
videoplayer: update frametime, it might change due to fps detection
videoplayer: give streams with invalid fps a chance for fps detection
dvdplayer: allow rewinding at end of stream, do a seek after rewind
X11: ditch SDL for video and window events