Makefile: Factor out some duplicate link libraries generation

The generators for executable and library targets duplicate the logic to
call the OutputLinkLibraries helper on the local generator.  Factor it
out into a cmMakefileTargetGenerator::CreateLinkLibs method to avoid
dpulication.
cmLocalGenerator: Add format option to ConvertToOutputForExisting

Replace the hard-coded SHELL output format with an optional argument.
cmLocalGenerator: Add format option to ConvertToIncludeReference

Replace the hard-coded SHELL output format with an optional argument.
cmLocalGenerator: Add format option to ConvertToLinkReference

Replace the hard-coded SHELL output format with an optional argument.
cmLocalGenerator: Simplify GetIncludeFlags output formatting

Use the output format argument to ConvertToIncludeReference.
cmLocalGenerator: Add response file option to OutputLinkLibraries

Response files require different path conversion to be threaded
through construction of the link libraries flags.
Windows: Use response files for link libs with GNU tools

Work around the command-line-length limit by using an @linklibs.rsp
response file to pass the flags for link libraries.  This allows
very long lists of libraries to be used in addition to the existing
support for passing object files via response file.

Inspired-by: Peter Keuschnigg <peter.keuschnigg@pmu.ac.at>
Merge topic 'link-libraries-response-files' into next

1db938fd Windows: Use response files for link libs with GNU tools
5e8e4d0f cmLocalGenerator: Add response file option to OutputLinkLibraries
b9aa5041 cmLocalGenerator: Simplify GetIncludeFlags output formatting
971653b7 cmLocalGenerator: Add format option to ConvertToLinkReference
0c0ef9e7 cmLocalGenerator: Add format option to ConvertToIncludeReference
02bebd60 cmLocalGenerator: Add format option to ConvertToOutputForExisting
c8751709 Makefile: Factor out some duplicate link libraries generation