cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.

The callers already skip non-targets, so unify the target search.

Change supporting functions to accept a container of targets instead
of strings where possible.
cmTarget: Extract a ComputeLinkImplementationLanguages method.
cmTarget: Re-arrange the ComputeLinkInterface method.

Arrange the logic so that the part which deals with libraries only is
at the top.  In a follow-up commit, this will be split into two methods.

Ensure that the explanatory CMP0022 comment is only present in one
location.
cmTarget: Extract a ComputeLinkInterfaceLibraries method.

When evaluating the SOURCES property, we will need to be able to access
the link libraries without accessing the link languages, as the languages
depend on the SOURCES.
cmTarget: Move ComputeLinkInterface to the internal class.

In a follow-up, this will use the OptionalLinkInterface in its
API. That class is in the cmTargetInternals class.
cmTarget: Avoid computing languages when computing transitive targets.

For the OLD CMP0022 behavior, we need to treat the implementation
as the interface when computing the interface libraries.  Make it
possible to do that without computing the link languages by adding
a new GetLinkImplementationLibraries method.  Extend the existing
GetLinkImplementation method to populate the languages if the
libraries have already been computed and cached.

Change GetTransitivePropertyTargets to invoke GetLinkInterfaceLibraries
instead of GetLinkInterface.  This is key, as it is a method called
by cmGeneratorExpressionEvaluator.

Change the cmGeneratorExpressionEvaluator to invoke
GetLinkImplementationLibraries instead of GetLinkImplementation.
cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility

This simplifies further refactoring.
cmTarget: Add GetTransitiveTargetClosure method.

Replace calls to GetLinkInformation with calls to a method to get only
the target closure, not the link languages etc.  The replaced calls
are used while evaluating generator expressions only.  This makes
transitive generator expression evaluation independent from
the languages of a target.  In a follow-up topic, it will be possible
to make the languages depend on generator expression evaluation, via
evaluation of the SOURCES and INTERFACE_SOURCES target properties.

Because the order of entries is not the same as the final link line,
the order of debug output is different in the RunCMake.CompatibleInterface
test, because the BOOL_PROP7 target property is evaluated first. Adjust
the test to account for that new order.
cmGeneratorTarget: Use a method to access the definition file.
cmGeneratorTarget: Classify sources on demand, not up front.

Implement a Visitor to hold the sequence of source file tests
for populating outputs.  Use VS 6 and 7 workaround from Brad
King for lack of partial template specialization capability.

This will make it possible to use context dependent generator
expressions to determine the sources of a target.
Handle Mac OSX source flags for individual files lazily.

The actual list of files will become config dependent in a follow-up
commit.
Merge topic 'target-SOURCES-refactor' into next

ed24799e Handle Mac OSX source flags for individual files lazily.
2ca4b33b cmGeneratorTarget: Classify sources on demand, not up front.
a0f0955f cmGeneratorTarget: Use a method to access the definition file.
d5fd34d5 cmTarget: Add GetTransitiveTargetClosure method.
901b72fc cmTarget: Create a temporary cmTarget in checkInterfacePropertyCompatibility
846ab8c7 cmTarget: Avoid computing languages when computing transitive targets.
ed339049 cmTarget: Move ComputeLinkInterface to the internal class.
56e4c965 cmTarget: Extract a ComputeLinkInterfaceLibraries method.
c8c8f2b9 cmTarget: Re-arrange the ComputeLinkInterface method.
a1923fe8 cmTarget: Extract a ComputeLinkImplementationLanguages method.
8fd4a89f cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.