scoped_refptr: support opaque pointed-to classes via extern template
The C++ spec says the compiler may instantiate inline template
function definitions (e.g., member functions defined inline within a
templated class, even without an explicit "inline" keyword) even if
there's an "extern template class Foo<Bar>;" declaration.
In the case of scoped_refptr, if we merely have a forward declaration
for a class like "class Opaque;", then "extern template class
scoped_refptr<Opaque>;" will still cause compiler errors because of
scoped_refptr's inline member functions that try to call AddRef() and
Release().
To solve this, this CL introduces static helper methods that are
defined out-of-line to provide access to the AddRef() and Release()
methods.
BUG=414363
Review URL: https://codereview.chromium.org/
623633002
Cr-Commit-Position: refs/heads/master@{#298991}