libxvid: remove temporary files at the end

Fixes Ticket924

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libxvid: use av_freep() for saftey

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libxvid: check & clear encoder_handle

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libxvid: cleanup on error pathes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>