Define AO_nop_full as compiler barrier for pre-ARMv6 single-core case

* src/atomic_ops/sysdeps/gcc/arm.h (AO_nop_full): Define for pre-ARMv6
as well (as a compiler barrier) if AO_UNIPROCESSOR; refine comment.
* src/atomic_ops/sysdeps/msftc/arm.h (AO_nop_full): Likewise.
* src/atomic_ops/sysdeps/msftc/arm.h: Eliminate duplicated include of
test_and_set_t_is_ao_t.h.
Implement load/store via simple LDR/STR for ARMv6+ (msftc)

* src/atomic_ops/sysdeps/msftc/arm.h: Include
all_aligned_atomic_load_store.h instead of all_atomic_load_store.h
(since unaligned accesses are not guaranteed to be atomic).
* src/atomic_ops/sysdeps/msftc/arm.h (AO_load): Remove; include
all_aligned_atomic_load_store.h unconditionally instead (thus
implementing AO[_char/short]_load/store via simple LDR/STR; add
comment about Windows interrupt handlers.
* src/atomic_ops/sysdeps/msftc/arm.h: Add TODO item to implement
AO_test_and_set_full (for pre-ARMv6).
Revert "Fix read_ordered.h inclusion for ARM"
(because it makes load_acquire/read incorrect for multi-core ARM)

This reverts commit fcc838be49c98486c26738764f895d34de0716be.
Fix (remove) invalid include of read_ordered.h for ARM
(fix commit 2df9c1e partially)

* src/atomic_ops/sysdeps/gcc/arm.h: Do not include read_ordered.h
(because load_acquire should contain a DMB instruction in a multi-core
case, new load_acquire/read primitives implementation is generalized
using nop_full/read which either contain a DMB instruction, or is just
a compiler barrier for uniprocessor).
* src/atomic_ops/sysdeps/armcc/arm_v6.h: Likewise.
* src/atomic_ops/sysdeps/msftc/arm.h: Likewise.
Add compile-time assertion for size of 'standard' AO_double_t

* src/atomic_ops/sysdeps/standard_ao_double_t.h
(AO_double_t_size_static_assert): Add compile-time assertion for
AO_double_t size.
Implement AO_and/or/xor efficiently for ARM

* src/atomic_ops/sysdeps/gcc/arm.h (AO_and, AO_or, AO_xor): Implement
directly using LDREX/STREX (enabled only if not AO_PREFER_GENERALIZED).
Remove improper comment for AO_XSIZE_load_read

* src/atomic_ops/generalize-small.template (AO_XSIZE_load_read):
Remove improper comment (because nop barrier type matches that of
load primitive).
* src/atomic_ops/generalize-small.template (AO_XSIZE_store_write):
Reorder AO_HAVE_nop_write and AO_HAVE_XSIZE_store checking (to match
that for other primitives in this file).
* src/atomic_ops/generalize-small.h: Regenerate.
Fix double_compare_and_swap compile-time error in gcc/generic.h

* src/atomic_ops/sysdeps/gcc/generic.h (AO_double_compare_and_swap):
Fix access to old_val value.
Fix AO_double_t definition for AArch64

* src/atomic_ops/sysdeps/standard_ao_double_t.h (double_ptr_storage):
Define explicitly for AArch64 (use __int128 instead of long long).
Define nop_write as 'dmb st' for AArch64

* src/atomic_ops/sysdeps/gcc/aarch64.h (AO_nop_write): Define via asm
(dmb st) statement unless AO_UNIPROCESSOR (because it seems there is
no equivalent definition using compiler __atomic_thread_fence).
* src/atomic_ops/sysdeps/gcc/generic.h (AO_nop_write): Do not define
if already is.
Move gcc-generic AO_t-wide primitives to generic-small/arithm headers
(code refactoring)

* src/atomic_ops/sysdeps/gcc/generic-small.h: New file.
* src/atomic_ops/sysdeps/gcc/generic-arithm.h: Likewise.
* src/atomic_ops/sysdeps/gcc/generic.h: Include generic-small.h file.
* src/atomic_ops/sysdeps/gcc/generic.h (AO_load, AO_load_acquire,
AO_store, AO_store_release, AO_fetch_compare_and_swap,
AO_compare_and_swap): Move to generic-small.h file.
* src/atomic_ops/sysdeps/gcc/generic.h: Include generic-arithm.h file
unless AO_PREFER_GENERALIZED.
* src/atomic_ops/sysdeps/gcc/generic.h (AO_fetch_and_add,
AO_fetch_and_add_acquire, AO_fetch_and_add_release,
AO_fetch_and_add_full, AO_and, AO_and_acquire, AO_and_release,
AO_and_full, AO_or, AO_or_acquire, AO_or_release, AO_or_full, AO_xor,
AO_xor_acquire, AO_xor_release, AO_xor_full): Move to generic-arithm.h
file.
* src/Makefile.am (nobase_private_HEADERS): Add gcc/generic-arithm.h,
gcc/generic-small.h entries.
Implement char/short/int-wide primitives using GCC built-in atomic/sync

* src/Makefile.am (EXTRA_DIST): Add gcc/generic-arithm.template,
gcc/generic-small.template entries.
* src/Makefile.am (nobase_private_HEADERS): Move gcc/generic-arithm.h,
atomic_ops/sysdeps/gcc/generic-small.h to BUILT_SOURCES.
* src/Makefile.am (atomic_ops/sysdeps/gcc/generic-arithm.h,
atomic_ops/sysdeps/gcc/generic-small.h): New rules (to generate
AO_char/short/int_X primitives included from gcc/generic.h file.
* src/atomic_ops/sysdeps/gcc/generic-arithm.template: New template
file (based on code moved from generic-arithm.h).
* src/atomic_ops/sysdeps/gcc/generic-small.template: New template file
(based on code moved from generic-small.h).
* src/atomic_ops/sysdeps/gcc/generic-arithm.h: Regenerate.
* src/atomic_ops/sysdeps/gcc/generic-small.h: Likewise.
Minimize gcc/generic-arithm template by factoring out barriers
(code refactoring)

* src/Makefile.am (atomic_ops/sysdeps/gcc/generic-arithm.h): Iterate
over XBAR/XGCCBAR (in addition to XSIZE/XCTYPE).
* src/atomic_ops/sysdeps/gcc/generic-arithm.template: Parametrize all
primitives with XBAR (replacing AO none/acquire/release/full barriers)
and with XGCCBAR (replacing GCC atomic RELAXED/ACQUIRE/RELEASE/SEQ_CST
barriers, respectively).
* src/atomic_ops/sysdeps/gcc/generic-arithm.h: Regenerate.
Merge remote-tracking branch 'origin/master' into add-aarch64-support
gcc/x86.h: Add TODO items