avutil/buffer: Move USE_ATOMICS to thread.h to avoid it becoming out of sync with it

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