[rbp/omxplayer] Add caching of states to reduce number of round trip delays to GPU
[rbp/omxplayer] Add wait for buffers done calls
[rbp/omxplayer] Handle timeouts greater than a second
[rbp/omxplayer] Callback context pointer is not needed once in the class
[rbp/omxplayer] Callback context pointer is not needed once in the class
[rbp/omxplayer] Add timeouts to buffer calls
[rbp/omxplayer] Avoid state change when already in loaded
[rbp/omxplayer] Remove warnings from event logging calls
[rbp/omxplayer] Add more event logging
[rbp/omxplayer] Signal bad state on decode error

Also abort timeouts early when in bad state
[rbp/omxplayer] We should block until buffers are released
[rbp/omxplayer] Load OMX dll just once

On Pi xbmc isn't usable without OMX (used for video, audio, image encode and decode),
so rather than loading dll with every component, just load it once at initialisation and assume it's there
[rbp/omxplayer] Restructure COMXImage

Tidy up of COMImage. Separate into file reading, encode and decode classes with separate locks.
This allows some overlap of functionality which improves the speed.
[rbp/omxplayer] Replace jpeg parsing with cheaper byte aligned accesses

All the parsing is byte aligned. This function is about ten times faster with this patch
[rbp/omxplayer] Fix bugs with jpeg parsing

I was finding GetCodingType to sometimes take 200ms for a single jpeg.
That was a mixture of the slow bit oriented parsing, and more significantly some bugs.
The SOF blocks skipped the wrong number of bytes, meaning we ended up parsing junk.
The M_TEM, M_DRI, M_SOI and M_EOI tags when seen (usually due to the junk) can only escape by slowly parsing until end of file.
Also, after a M_SOS, there is the variable sized jpeg block which we can't parse, so best to give up then, rather than misparsing the jpeg data
[rbp/omxplayer] Fix wait at end of encode and decode
[rbp/omxplayer] Remove component locking

We always need to have a higher level lock to provide atomicity of groups of accesses,
so remove the lock from the lowest level
[rbp/omxplayer] First attempt at a jpeg thumbnail pipeline
[rbp/omxplayer] First attempt at decode to texture
[rbp/omxplayer] Merge: some improvements to omx commands