avutil/log: use thread wrappers for the locking functionality

w32threads and os2threads both support static mutex initialization now,
so don't limit it to pthreads only.

Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
