Order cmGeneratorTargetsType elements deterministically.

Define a custom ordering functor to deterministically and strictly
order the cmTarget* key. Otherwise the order would be dependent on
runtime pointer values, which breaks assumptions of some generators.

The functor orders first by target name, and then by directory. Multiple
global targets may have the same name, such as edit_cache, but their
directory differentiates them.
Port some of the generator API to cmGeneratorTarget.

Just enough to reach the BuildMacContentDirectory method and the
NeedRelinkBeforeInstall methods.

In the future, those methods can be moved to cmGeneratorTarget.
FindSWIG: Mark SWIG_DIR & SWIG_VERSION as advanced (#13426)
FindSWIG: Search for swig.swg only on host (#13449)

Use NO_CMAKE_FIND_ROOT_PATH to ensure swig.swg can be found on the host
even when cross-compiling.
Merge topic 'use-generator-target' into next

c34968a Port some of the generator API to cmGeneratorTarget.
abb13ea Order cmGeneratorTargetsType elements deterministically.
FindSWIG: Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_ROOT (#13771)

This is a simpler way to reference the location of UseSWIG.cmake.
Merge topic 'FindSWIG-fix13426' into next

6620dc7 FindSWIG: Mark SWIG_DIR & SWIG_VERSION as advanced (#13426)
Merge topic 'FindSWIG-fix13449' into next

19b7a54 FindSWIG: Search for swig.swg only on host (#13449)
Merge topic 'FindSWIG-fix13771' into next

8c127c9 FindSWIG: Use CMAKE_CURRENT_LIST_DIR instead of CMAKE_ROOT (#13771)