avcodec/bitstream_filter: make av_register_bitstream_filter() thread safe

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat: make av_register_*put_format() thread safe

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