MS ABI: Don't always instantiate all members of dllexported class templates (PR20163)

Normally we mark all members of exported classes referenced to get them emitted.

However, MSVC doesn't do this for class templates that are implicitly specialized or
just have an explicit instantiation declaration. For such specializations, the members
are emitted when referenced.

The exception is the case when the dllexport attribute is propagated from a base class
to a base class template that doesn't have an explicit attribute: in this case all
methods of the base class template do get instantiated.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216145 91177308-0d34-0410-b5e6-96231b3b80d8