Ninja: Query custom commands once per target, not once per file.

Computing the source files is now more expensive, so the Ninja
generator became very slow with a large number of files.
cmTarget: Extract a ProcessSourceItemCMP0049 method.

Avoid calling AddSource for each src filename.  That involves
checking each entry for uniqueness and creating a separate
generator expression for each one.

Instead, add a single entry for the list of sources.  The source
files are passed through a uniqueness filter at generate-time, so
duplicates don't matter so much.
cmTarget: Cache the cmSourceFiles in GetSourceFiles.

Avoid calling GetSourceFiles with the same result container multiple
times when tracing target dependencies.  The result from the previous
configuration is cached and used later otherwise.
cmGeneratorTarget: Trace cmSourceFile objects instead of strings.

This reverses the decision in commit d38423ec (cmTarget: Add a
method to obtain list of filenames for sources., 2014-03-17).  The
cmSourceFile based API is preferred because that avoids creation of
many cmSourceFileLocation objects for matching strings, and the
result is cached by cmTarget.
cmTarget: Make GetSourceFiles string overload private.

Consumers should use the cmSourceFile overload, which is now
always the case.
CMake Nightly Date Stamp
Merge topic 'optimize-source-file-processing'

a4e6bf8e cmTarget: Make GetSourceFiles string overload private.
92e2fbe1 cmGeneratorTarget: Trace cmSourceFile objects instead of strings.
c5b26f3b cmTarget: Cache the cmSourceFiles in GetSourceFiles.
eb163f37 cmTarget: Extract a ProcessSourceItemCMP0049 method.
19b7c22d Ninja: Query custom commands once per target, not once per file.