IsOff: Use the length for the string construction

No need to waste the calculation and force the string to call strlen
again.
SystemTools: Use a set in Is{On,Off}

Also check before calling toupper() umpteen million times.
FindCurses: Overhaul Curses and NCurses search logic (#15011)

Produce a more consistent result by finding only a single include
directory and reporting which headers may be included from it.  The
previous search for each header separately might find pieces from
separate and incompatible packages.

While at it, provide the CURSES_INCLUDE_DIRS result variable to be
consistent with other modules.
cmMakefile: fix __CMAKE_RULE property setting

It got put into the condition by mistake.
export_library_dependencies: Use original link libraries internally

This command was using the cmTarget::GetLinkLibraries method with a
comment explaining how execution order gives it the dependencies before
analysis.  Just use cmTarget::GetOriginalLinkLibraries instead.
cmTarget: Rename old-style link dependencies code as "ForVS6"

The old link dependency analysis is now needed only for the VS 6
generator code delimited by CM_USE_OLD_VS6 to support project-provided
project templates.  Rename the related cmTarget members to be "ForVS6".
cmTarget: Run old-style link dependencies only for VS 6

Invoke it at runtime only with the VS 6 generator.  No other generators
need it.
cmTarget: Compile old-style link dependencies only for VS 6

Compile all the "ForVS6" cmTarget members only on Windows.  No other
platforms support the VS 6 generator.
FindImageMagick: Use pkgconfig hints if available (#14012)

Tested-by: bastien ROUCARIES <roucaries.bastien@gmail.com>
Revert "Help: Update cmake-packages.7 examples to import targets only once"

This reverts commit cfab942e5ff8463f8053564e68179da110280b43.
Since commit v2.8.11~362^2 (Generate an early-return guard in target
Export files, 2012-11-30) an external include guard is not needed.
Merge topic 'doc-package-target-import-once'

0fee3f47 Revert "Help: Update cmake-packages.7 examples to import targets only once"
Merge topic 'FindImageMagick-pkgconfig'

90245fe8 FindImageMagick: Use pkgconfig hints if available (#14012)
Merge topic 'dev/fix-cmake-rule-property'

4b139169 cmMakefile: fix __CMAKE_RULE property setting
Merge topic 'dev/ison-isoff-performance'

43a8c552 SystemTools: Use a set in Is{On,Off}
9270aa9a IsOff: Use the length for the string construction
Merge topic 'FindCurses-overhaul'

6c8364e6 FindCurses: Overhaul Curses and NCurses search logic (#15011)
Merge topic 'target-legacy-depends-only-for-vs6'

8a205b98 cmTarget: Compile old-style link dependencies only for VS 6
d57be904 cmTarget: Run old-style link dependencies only for VS 6
b3b44d13 cmTarget: Rename old-style link dependencies code as "ForVS6"
80cb12bb export_library_dependencies: Use original link libraries internally