add unit test, use md5 and psnr to test the validity of decode.

usage:
./unit_test.sh  /path/to/h264/dir/
./unit_test.sh  /path/to/vp8/dir/
./unit_test.sh  /path/to/jpeg-file/dir/ /path/to/jpeg/ref/yuv/
tests: add decoder stream output

       refact code, it's easy to support other decode output such as psnr, md5.