avutil/buffer: add #if USE_ATOMICS around atomics specific functions to ensure sync...