Wait for and close AVCodec threads at end.
Wait for and close AVCodec threads at end.

Except when using x264 because it may crash at the end of the second
pass when using multiple threads. Also, cleanup another dual pass log
file that new versions of x264 creates.

ttill/MLT,gmarco/mlt-orig,zzhhui/mlt,xzhavilla/mlt,siddharudh/mlt,ttill/MLT-roto,j-b-m/mlt,siddharudh/mlt,anba8005/mlt,xzhavilla/mlt,zzhhui/mlt,zzhhui/mlt,gmarco/mlt-orig,wideioltd/mlt,zzhhui/mlt,xzhavilla/mlt,siddharudh/mlt,gmarco/mlt-orig,zzhhui/mlt,gmarco/mlt-orig,ttill/MLT-roto,j-b-m/mlt,ttill/MLT-roto-tracking,ttill/MLT-roto-tracking,siddharudh/mlt,ttill/MLT-roto-tracking,anba8005/mlt,ttill/MLT-roto,zzhhui/mlt,wideioltd/mlt,ttill/MLT-roto,mltframework/mlt,mltframework/mlt,zzhhui/mlt,xzhavilla/mlt,siddharudh/mlt,j-b-m/mlt,ttill/MLT-roto-tracking,mltframework/mlt,wideioltd/mlt,anba8005/mlt,xzhavilla/mlt,gmarco/mlt-orig,ttill/MLT-roto,anba8005/mlt,ttill/MLT,j-b-m/mlt,j-b-m/mlt,ttill/MLT,ttill/MLT,j-b-m/mlt,mltframework/mlt,mltframework/mlt,j-b-m/mlt,mltframework/mlt,ttill/MLT-roto-tracking,anba8005/mlt,siddharudh/mlt,ttill/MLT-roto,gmarco/mlt-orig,ttill/MLT-roto,j-b-m/mlt,ttill/MLT-roto-tracking,mltframework/mlt,gmarco/mlt-orig,j-b-m/mlt,gmarco/mlt-orig,xzhavilla/mlt,mltframework/mlt,xzhavilla/mlt,xzhavilla/mlt,anba8005/mlt,ttill/MLT-roto-tracking,ttill/MLT-roto-tracking,gmarco/mlt-orig,anba8005/mlt,wideioltd/mlt,ttill/MLT,j-b-m/mlt,ttill/MLT,ttill/MLT,siddharudh/mlt,anba8005/mlt,anba8005/mlt,siddharudh/mlt,mltframework/mlt,wideioltd/mlt,wideioltd/mlt,xzhavilla/mlt,wideioltd/mlt,wideioltd/mlt,wideioltd/mlt,zzhhui/mlt,ttill/MLT,siddharudh/mlt,ttill/MLT,mltframework/mlt,ttill/MLT-roto-tracking,zzhhui/mlt,ttill/MLT-roto,ttill/MLT-roto