avutil/log: make default av_log callback thread safe

This uses a pthread mutex

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avutil/log: document log callback thread saftey requirements

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