v4l2: use populateOutputHandles in decode
v4l2decdoe: create all EGLImage/Texture during initialization
v4l2: decode output index is in ramdom order
v4l2decode: partial fix for seg fault in mesa in glDeleteProgram/glDeleteProgram

there is still randomly fail in mesa; no good idea for it.

0  0x00007ffff079c343 in _mesa_symbol_table_dtor () from /usr/lib/x86_64-linux-gnu/libdricore9.2.1.so.1
1  0x00007ffff073c55d in glsl_symbol_table::~glsl_symbol_table() () from /usr/lib/x86_64-linux-gnu/libdricore9.2.1.so.1
2  0x00007ffff072a4d5 in ?? () from /usr/lib/x86_64-linux-gnu/libdricore9.2.1.so.1
3  0x00007ffff072a4bd in ?? () from /usr/lib/x86_64-linux-gnu/libdricore9.2.1.so.1
4  0x00007ffff064b48f in _mesa_reference_shader () from /usr/lib/x86_64-linux-gnu/libdricore9.2.1.so.1
5  0x00007ffff0649397 in ?? () from /usr/lib/x86_64-linux-gnu/libdricore9.2.1.so.1
6  0x000000000040624d in releaseShader (program=0x77cd90) at ./egl/gles2_help.c:158
7  eglRelease (context=0x615920) at ./egl/gles2_help.c:310
8  0x0000000000402ca8 in main (argc=<optimized out>, argv=<optimized out>) at v4l2decode.cpp:531
fixes: misc but important

 - return invalid getFormatInfo when decoder hasn't initialized
 - avoid call m_decoder->start() another time when it has initialized
 - clear device event only when there is any, otherwise it may block
   it happends during reset, there is no device event but SetDevicePollInterrupt
 - simple set output frame size to satify chrome even in texture mode
decode/encode: accept empty buffer as EOS

it is natural to send EOS from input port
especially for v4l2 wrapper, where input and output are independent
v4l2: handle EOS for decode

EOS is handled in synchronos way:
 - EOS reach input port first (EosStateInput); it wake up output thread,
   then wait until output port handled EOS
 - EOS and thread communication (condition wait) work mutually
   eos state operation func are in base class with lock, subclass may use them.
   thread condition wait are kept in base class
v4l2: use drm backend
tests: use drm backend if possible
tests: yamidecode create all EGLImages during initialization