Use atomic_fetch_add from C11's stdatomic if available or fallback to
GCC's __atomic functions.
Remove atomic_add because is can trivially be implemented by calling
exchange_and_add instead.
Uses static local variable like how jack_user_dir does. jack_get_tmpdir()
replaces jack_tmpdir for the most part except in jackd -l where it would
cause an infinite loop, and instead DEFAULT_TMP_DIR is used, which is
what it would happen anyway. Also in jack_user_dir the default value is
used if jack_user_dir returns NULL from some error, but an error message
is printed with jack_error(), this is the same as the old behavior, but
I am not sure this is quite what should happen. Still, the exact same
behavior as before is acheived except without the use of the jack_tmpdir
global and the memory issues caused by calling jack_get_tmpdir().
This cannot be implemented at present because jack_port_set_name() does not take
a jack_client_t* as an argument, and thus no msg can be sent to the server
regarding the name change. Jack2 accomplishes this by walking its static array
of clients to find one that is in use and sends the msg using that one. This
is not possible in Jack1 because we do not use static arrays of clients (or
ports).