Implement base::AtomicRefCount as a class wrapping std::atomic_int.

This is the more standard approach since C++11, and it allows this class to
be encapsulated (preventing abuse by performing other operations on the data).

If landed, call sites will be rewritten to call member functions directly.

A warning must be suppressed in MSVC, because std::atomic forces alignment,
and MSVC warns on end-padding due to alignment on a class, which occurs
in base::RefCountedThreadSafe in debug builds (and the warning is not
targeted at base/memory/ref_counted.*, so it's hard to suppress).

Bug: 736037
Tbr: [email protected],[email protected]
Change-Id: Ieb0599b4a67a4e8db06bd4d08c3126baea9207e2
Reviewed-on: https://chromium-review.googlesource.com/550378
Commit-Queue: Jeremy Roman <[email protected]>
Reviewed-by: danakj <[email protected]>
Reviewed-by: Bruce Dawson <[email protected]>
Reviewed-by: Taiju Tsuiki <[email protected]>
Cr-Commit-Position: refs/heads/master@{#483238}
6 files changed