introduce UDEAL_DEBUG to debug race conditions

This makes udeal's behaviour reproducible, with the worst case scenario
(upump callback).
fix avcodec encode module