cmSourceFileLocation: Avoid string allocation in extension checking

The substr call was causing excess allocations. Swap the cheaper
character check to be before the longer string comparison, now using the
prefix checking function.
cmSourceFileLocation: Simplify logic in Matches
cmSourceFileLocation: Save some string copies
cmSourceFileLocation: Return a string reference
cmSourceFile: Cache the isUiFile check

The filename extension call is expensive, so cache the .ui check.
perf: Cache the language property string
cmSourceFile: Take a string
Merge topic 'dev/source-file-performance' into next

77b37965 cmSourceFile: Take a string
7b8a9904 perf: Cache the language property string
10baf00f cmSourceFile: Cache the isUiFile check
14e7a8ae cmSourceFileLocation: Return a string reference
b4cb543e cmSourceFileLocation: Save some string copies
e8e1f3a1 cmSourceFileLocation: Simplify logic in Matches
5554910e cmSourceFileLocation: Avoid string allocation in extension checking