[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.