avcodec/bitstream_filter: make av_register_bitstream_filter() thread safe