lavu/atomic: add support for the new memory model aware gcc built-ins

__sync built-ins are considered legacy and will be deprecated.
These new memory model aware built-ins have been available since GCC 4.7.0

Use them by default when available except for __atomic_compare_exchange_n(),
which is slower, and is instead implemented as a fallback for when and if gcc
removes the legacy __sync built-ins.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
avformat/subtitles: reduce log level of UTF-16 warning

Applications can use this to silence the message.
avformat/mpjpeg: make boundary tag user customizable

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