lavc,lavfi: use avutil/thread.h instead of redundant conditional includes