tests: add decoder stream output

       refact code, it's easy to support other decode output such as psnr, md5.
encoder: move output queue from h264 to base
encoder: move reorder to h264 since vp8 do not need it
v4l2: use AVC_STREAM_FORMAT_ANNEXB for encoder
egl_util: createEglImageFromHandle
small update for vaapidisplay
decode: add timestamp in output frames

chrome use the timestamp as id for input buffer recycle
decode: add populateOutputHandles() to export all possible output frame handles

chrome v4l2 vda creates all EGLImage during initialization (before output frame
is ready).
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.
seems to be mesa bug
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 POLLIN events, 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
 - synchronized STREAMOFF command, wait until corresponding worker thread exit/cleanup
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
v4l2decode: add frame dump dir support
x11: conditionally build with x11 support
codecparser: rename the lib name to libyami_codecparser