configure: prettify atomics handling.

Add simpler names and a shorthand for native atomics (as opposed to
pthreads fallback).
configure: Check for the atomic.h functions used in the suncc atomics header

The "suncc" atomics implementation uses a suncc specific memory
barrier, but also relies on a few atomic functions from atomic.h,
that are not suncc specific but specific to solaris. This made
the current implementation fail on suncc on linux.
avfiltergraph: check for sws opts being non-NULL before using them.

Avoid snprintfing a NULL pointer.

CC: libav-stable@libav.org